public static @NotNull Presentation getTemplatePresentation(@NotNull AnAction action) {
    Presentation presentation = action.getTemplatePresentation();
    if (action instanceof ActionStubBase stub && StringUtil.isEmpty(presentation.getText())) {
      return Objects.requireNonNullElse(getTemplatePresentation(stub.getId(), null), presentation);
    }
    else {
      return presentation;
    }
  }
public static @NotNull Presentation getTemplatePresentation(@NotNull AnAction action)