code: public static IAction register(boolean asGlobal, String id, String label, String script) {
          return register(asGlobal, new Action(id, label, script));
      }
docs: Adds an action to the global or local registry.
  
  @param asGlobal If true, register as global action; if false, local action.
  @param id Unique id.
  @param label Action's label.
  @param script Action's script.
  @return The added action.