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