@Override
  public void update(@NotNull AnActionEvent event) {
    super.update(event);
    event.getPresentation().setVisible(event.getPresentation().isVisible() && !EditorUtil.contextMenuInvokedOutsideOfSelection(event));
  }
@Override
  public void update(@NotNull AnActionEvent event)