@Override
  public void update(@NotNull AnActionEvent e) {
    // Alt-Enter hotkey for editor takes precedence over this action
    e.getPresentation().setEnabled(e.getData(CommonDataKeys.EDITOR) == null);
  }
@Override
  public void update(@NotNull AnActionEvent e)