@Override
  public void update(@NotNull AnActionEvent event) {
    if (!getLanguageExtension().hasAnyExtensions()) {
      event.getPresentation().setEnabledAndVisible(false);
      return;
    }
    // since previous handled may have changed the presentation, we need to restore it; otherwise it will stick.
    event.getPresentation().copyFrom(getTemplatePresentation());
    applyTextOverride(event);
    super.update(event);

    // for Undo to show the correct action name, we remember it here to return from getCommandName(), which lack context of AnActionEvent
    myCurrentActionName = event.getPresentation().getText();
  }
@Override
  public void update(@NotNull AnActionEvent event)