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