void (@NotNull AnActionEvent e) { EditorSearchSession search = e.getData(EditorSearchSession.SESSION_KEY); Editor editor = search != null ? search.getEditor() : e.getData(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE); e.getPresentation().setEnabled(editor != null && search != null && !ConsoleViewUtil.isConsoleViewEditor(editor)); }