public static @Nullable Presentation getTemplatePresentation(@NotNull @NlsSafe String actionId,
                                                               @Nullable String boundSourceId) {
    AnAction action = ActionManager.getInstance().getActionOrStub(actionId);
    Presentation presentation = action == null ? null : action.getTemplatePresentation();
    String text = presentation == null ? null : presentation.getText();
    if (StringUtil.isEmpty(text)) { // fill dynamic presentation gaps
      if (ourBrokenActions.add(actionId)) {
        AnAction action2 = action instanceof ActionStubBase ? ActionManager.getInstance().getAction(actionId) : null;
        Presentation presentation2 = action2 == null ? null : action2.getTemplatePresentation();
        String text2 = presentation2 == null ? null : presentation2.getText();
        if (StringUtil.isEmpty(text2)) {
          LOG.warn("No text in '" + actionId + "' template presentation" +
                   (boundSourceId != null ? " (bound by " + boundSourceId + ")" : "") +
                   ". Showing its action-id instead");
        }
        else {
          LOG.info("No text in '" + actionId + "' stub template presentation" +
                   (boundSourceId != null ? " (bound by " + boundSourceId + ")" : "") +
                   ". Creating its instance");
        }
        return presentation2;
      }
    }
    return presentation;
  }
public static @Nullable Presentation getTemplatePresentation(@NotNull @NlsSafe String actionId,
                                                               @Nullable String boundSourceId)