void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); Editor editor = TextComponentEditorAction.getEditorFromContext(event.getDataContext()); presentation.setEnabled(editor != null); }