Adds a plugin to the additional if this hasn't happened already
5919
@SuppressWarnings({"unchecked", "rawtypes"})
    protected void registerDependency(List additionalList, GrailsPlugin plugin) {
        if (!addedNames.contains(plugin.getName())) {
            addedNames.add(plugin.getName());
            additionalList.add(plugin);
            addPluginDependencies(additionalList, plugin);
        }
    }
846400
function setupCustomPlugin(name, plugin) {
        plugin.active = true;
        plugin.params = EXTEND({}, plugin.params || {});
        plugin.name = name;

        return plugin;
    }
892457
public function addPlugin(PluginInterface $plugin)
    {
        if ($this->io->isDebug()) {
            $this->io->writeError('Loading plugin '.get_class($plugin));
        }
        $this->plugins[] =  $plugin;
        $plugin->activate($this->composer, $this->io);

        if ($plugin instanceof EventSubscriberInterface) {
            $this->composer->getEventDispatcher()->addSubscriber($plugin);
        }
    }
691879
def register_plugin(self, name):
        """"""
        logger.info("Registering plugin: " + name)
        module = importlib.import_module(name)
        module.register_plugin(self)
18866
def add_plugin(self, plugin, call):
        
        meth = getattr(plugin, call, None)
        if meth is not None:
            self.plugins.append((plugin, meth))
165298
def _new_plugin(self, plugin):
        

        # First store the plugin info into our data store
        self.store_info(plugin, plugin['name'], type_tag='worker')

        # Place it into our active plugin list
        self.plugin_meta[plugin['name']] = plugin
130525
def activate(name):
    
    if name in plugins:
        plugins[name].activate()
    else:
        raise Exception("plugin {} not found".format(name))
1089512
def added(self, context):
        """"""
        context.ansi = ANSIFormatter(self._enable)
        context.aprint = context.ansi.aprint
226465
def add(name, options)
      fail ArgumentError, "A view hook '#{name}' already exists" if @hooks[name]
      context = options.delete(:context)
      hook = @hooks[name] = Hook.new(name, context, options)
      hook.apply! if @applied
    end
925250
def add_plugin(self, plugin, tabs, data, icon):
        """"""
        self.plugins_tabs.append((tabs, plugin))
        self.plugins_data.append((data, icon))
        self.plugins_instances.append(plugin)
151290
protected static function _addManifestCallback($plugin)
    {
        $data = Plugin::getData($plugin);
        foreach ($data as $name => $callback) {
            if (self::_isCallablePluginData($name, $plugin, $callback) && $plugin !== 'Core') {
                self::$_eventList[$name][$plugin] = $callback;
            }
        }
    }
454719
function (pluginId, bool) {
    timeline.plugins().forEach(function (element) {
      if (pluginId === element.obj.id) {
        element.enabled = bool;
      }
    });
    timeline();
  }
564727
def _add_plugin_options(self, available_plugins: Set[Type[Plugin]]) -> None:
        
        for plugin_class in available_plugins:
            # Add the current plugin's commands to the parser
            group = OptionGroup(self._parser, plugin_class.get_title(), plugin_class.get_description())
            for option in plugin_class.get_cli_option_group():
                group.add_option(option)
            self._parser.add_option_group(group)
568136
function injectAdditionalFunction (key) {
    var isAFunction = typeof additionalFunctions[key] === 'function'

    if (isAFunction) funcs[key] = additionalFunctions[key]
  }
968233
def _register_external_service(self, plugin_name, plugin_instance):
        
        for attr in plugin_instance.get_external_services().keys():
            if attr in self._external_services:
                raise PluginException("External service with name {} already exists! Unable to add "
                                      "services from plugin {}.".format(attr, plugin_name))
            self._external_services[attr] = plugin_instance.get_external_services().get(attr)
795995
public void addPlugin(final Plugin plugin) {
        // put plugin into the repository's reciever map
        synchronized (pluginMap) {
            String name = plugin.getName();

            // make sure the plugin has reference to repository
            plugin.setLoggerRepository(getLoggerRepository());

            Plugin existingPlugin = (Plugin) pluginMap.get(name);
            if (existingPlugin != null) {
                existingPlugin.shutdown();
            }

            // put the new plugin into the map
            pluginMap.put(name, plugin);
            firePluginStarted(plugin);
        }
    }
898001
def register_plugin(self, name, plugin):
        
        if self.has_plugin(name):
            self.release_plugin(name)
        self._active_plugins[name] = plugin
        setattr(self, name, plugin)
        return plugin