@Override
  public void update(@NotNull AnActionEvent e) {
    var editor = e.getData(CommonDataKeys.EDITOR);
    e.getPresentation().setEnabledAndVisible(
      isSupported() &&
      getFile(e) != null &&
      (!ActionPlaces.isPopupPlace(e.getPlace()) ||
       editor == null ||
       !editor.getSelectionModel().hasSelection() ||
       EditorUtil.contextMenuInvokedOutsideOfSelection(e)));
    e.getPresentation().setText(getActionName(e.getPlace()));
  }
@Override
  public void update(@NotNull AnActionEvent e)