void (@NotNull AnActionEvent e) { final Presentation presentation = e.getPresentation(); final Project project = e.getData(CommonDataKeys.PROJECT); presentation.setEnabled(true); if (project == null || project.isDisposed()) { presentation.setEnabledAndVisible(false); return; } if (null == getDefaultExecutor()) { presentation.setEnabledAndVisible(false); return; } presentation.setEnabledAndVisible(true); }