void (@NotNull final AnActionEvent e) { Project project = e.getProject(); ThumbnailView view = ThumbnailViewActionUtil.getVisibleThumbnailView(e); boolean hasApplicableExtension = ContainerUtil.and(ThemeFilter.EP_NAME.getExtensionList(), filter -> project != null && filter.isApplicableToProject(project)); e.getPresentation().setVisible(view != null && hasApplicableExtension); ThemeFilter filter = view != null ? view.getFilter() : null; e.getPresentation().setText(filter == null ? CommonBundle.message("action.text.all") : filter.getDisplayName()); }