private static @NotNull AnAction registerAction(@NotNull ActionRuntimeRegistrar actionRegistrar,
                                                  @NotNull String actionId,
                                                  @NotNull AnAction anAction,
                                                  @NotNull Map<String, AnAction> map) {
    AnAction action = actionRegistrar.getActionOrStub(actionId);
    if (action == null) {
      actionRegistrar.registerAction(actionId, anAction);
      map.put(actionId, anAction);
      action = anAction;
    }
    return action;
  }
private static @NotNull AnAction registerAction(@NotNull ActionRuntimeRegistrar actionRegistrar,
                                                  @NotNull String actionId,
                                                  @NotNull AnAction anAction,
                                                  @NotNull Map<String, AnAction> map)