code: public static IAction register(boolean asGlobal, IAction action) {
          getRegistry(asGlobal).register(action);
          return action;
      }
docs: Adds an action to the global or local registry.
  
  @param asGlobal If true, register as global action; if false, local action.
  @param action Action to add.
  @return The added action.