void (@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); if (project != null && file != null && file.isDirectory()) { ThumbnailManager thumbnailManager = ThumbnailManager.getManager(project); ThumbnailView thumbnailView = thumbnailManager.getThumbnailView(); thumbnailView.setRoot(file); thumbnailView.setVisible(true); thumbnailView.activate(); } }