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