void (@NotNull AnActionEvent e) { ThumbnailView view = ThumbnailViewActionUtil.getVisibleThumbnailView(e); if (view != null) { VirtualFile[] selection = view.getSelection(); if (selection.length == 1 && selection[0].isDirectory()) { view.setRoot(selection[0]); } else if (selection.length > 0) { FileEditorManager fileEditorManager = FileEditorManager.getInstance(view.getProject()); ImageFileTypeManager typeManager = ImageFileTypeManager.getInstance(); for (VirtualFile file : selection) { if (typeManager.isImage(file)) { fileEditorManager.openFile(file, false); } } } } }