void (@NotNull AnActionEvent e) { final Editor editor = CommonDataKeys.EDITOR.getData(DataManager.getInstance().getDataContext(myConsole.getComponent())); e.getPresentation().setEnabled(editor != null && editor.getDocument().getTextLength() > 0); }