void (@NotNull AnActionEvent event) { Project project = event.getData(CommonDataKeys.PROJECT); ProjectView view = project == null ? null : ProjectView.getInstance(project); if (ActionPlaces.PROJECT_VIEW_POPUP.equals(event.getPlace())) { event.getPresentation().setEnabledAndVisible(view != null && view.getCurrentViewId().equals(ScopeViewPane.ID)); } else { event.getPresentation().setEnabledAndVisible(view != null && view.getProjectViewPaneById(ScopeViewPane.ID) != null); } }