boolean (@NotNull AnActionEvent e) { ThumbnailView thumbnailView = getVisibleThumbnailView(e); Presentation presentation = e.getPresentation(); presentation.setEnabled(thumbnailView != null); return presentation.isEnabled(); }