void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); DataContext dataContext = event.getDataContext(); EditorWindow editorWindow = EditorWindow.DATA_KEY.getData(dataContext); boolean inSplitter = editorWindow != null && editorWindow.inSplitter(); presentation.setText(getPresentationText(inSplitter)); Project project = event.getData(CommonDataKeys.PROJECT); boolean enabled = (project != null && isActionEnabled(project, event)); if (ActionPlaces.isPopupPlace(event.getPlace())) { presentation.setVisible(enabled); } else { presentation.setEnabled(enabled); } }