Add the ginga-distributed default set of plugins to the
        reference viewer.
764480
def add_default_plugins(self, except_global=[], except_local=[]):
        
        # add default global plugins
        for spec in plugins:
            ptype = spec.get('ptype', 'local')
            if ptype == 'global' and spec.module not in except_global:
                self.add_plugin_spec(spec)

            if ptype == 'local' and spec.module not in except_local:
                self.add_plugin_spec(spec)
1002136
private void loadPreInstalledPlugins() {
    for (File file : listJarFiles(fs.getInstalledPluginsDir())) {
      PluginInfo info = PluginInfo.create(file);
      registerPluginInfo(info);
    }
  }
880983
def load_plugins(self, plugins):
        

        def instantiate(plugin):
            return plugin() if inspect.isclass(plugin) else plugin

        loaded_plugins = []
        plugins_seen = []

        # Iterate over plugins in reverse to permit users to override default
        # plugin config
        for plugin in reversed(plugins):
            if not is_plugin(plugin) or plugin.name in plugins_seen:
                continue
            # Build the plugins list in reverse to restore original order
            loaded_plugins.insert(0, instantiate(plugin))
            plugins_seen.append(plugin.name)

        return loaded_plugins
700452
def register_plugin(self):
        """"""
        self.focus_changed.connect(self.main.plugin_focus_changed)
        self.main.add_dockwidget(self)
#        self.main.console.set_historylog(self)
        self.main.console.shell.refresh.connect(self.refresh_plugin)
851984
def EnablePlugins(self, plugin_includes):
    
    self._plugins = []
    if not self._plugin_classes:
      return

    default_plugin_name = '{0:s}_default'.format(self.NAME)
    for plugin_name, plugin_class in iter(self._plugin_classes.items()):
      if plugin_name == default_plugin_name:
        self._default_plugin = plugin_class()
        continue

      if plugin_includes and plugin_name not in plugin_includes:
        continue

      plugin_object = plugin_class()
      self._plugins.append(plugin_object)
292184
def add_default(self, ext, content_type):
        
        default = CT_Default.new(ext, content_type)
        self.append(default)
310111
private void addPlugins(BaseProfileDescriptor pomDescriptor, BuildBase build, ScannerContext scannerContext) {
        if (null == build) {
            return;
        }
        List<Plugin> plugins = build.getPlugins();
        List<MavenPluginDescriptor> pluginDescriptors = createMavenPluginDescriptors(plugins, scannerContext);
        pomDescriptor.getPlugins().addAll(pluginDescriptors);
    }
1335212
def includeme(config):
    """"""
    config.add_route('references', '/references')
    _add_referencer(config.registry)
    config.add_view_deriver(protected_resources.protected_view)
    config.add_renderer('json_item', json_renderer)
    config.scan()
782155
public function addShortPluginAliases()
    {
        $plugins = Plugin::loaded();

        $io = new ConsoleIo();
        $task = new CommandTask($io);
        $io->setLoggers(false);
        $list = $task->getShellList() + ['app' => []];
        $fixed = array_flip($list['app']) + array_flip($list['CORE']);
        $aliases = $others = [];

        foreach ($plugins as $plugin) {
            if (!isset($list[$plugin])) {
                continue;
            }

            foreach ($list[$plugin] as $shell) {
                $aliases += [$shell => $plugin];
                if (!isset($others[$shell])) {
                    $others[$shell] = [$plugin];
                } else {
                    $others[$shell] = array_merge($others[$shell], [$plugin]);
                }
            }
        }

        foreach ($aliases as $shell => $plugin) {
            if (isset($fixed[$shell])) {
                Log::write(
                    'debug',
                    "command '$shell' in plugin '$plugin' was not aliased, conflicts with another shell",
                    ['shell-dispatcher']
                );
                continue;
            }

            $other = static::alias($shell);
            if ($other) {
                $other = $aliases[$shell];
                if ($other !== $plugin) {
                    Log::write(
                        'debug',
                        "command '$shell' in plugin '$plugin' was not aliased, conflicts with '$other'",
                        ['shell-dispatcher']
                    );
                }
                continue;
            }

            if (isset($others[$shell])) {
                $conflicts = array_diff($others[$shell], [$plugin]);
                if (count($conflicts) > 0) {
                    $conflictList = implode("', '", $conflicts);
                    Log::write(
                        'debug',
                        "command '$shell' in plugin '$plugin' was not aliased, conflicts with '$conflictList'",
                        ['shell-dispatcher']
                    );
                }
            }

            static::alias($shell, "$plugin.$shell");
        }

        return static::$_aliases;
    }
705713
private void addPluginConfigDefaultProperties() {
    for (ConfProp prop : ConfProp.values()) {
      if (conf.get(prop.name) == null)
        conf.set(prop.name, prop.defVal);
    }
  }
534336
private void appendDependentPluginKeys(String pluginKey, Set<String> appendTo) {
    for (PluginInfo otherPlugin : getPluginInfos()) {
      if (!otherPlugin.getKey().equals(pluginKey)) {
        for (PluginInfo.RequiredPlugin requirement : otherPlugin.getRequiredPlugins()) {
          if (requirement.getKey().equals(pluginKey)) {
            appendTo.add(otherPlugin.getKey());
            appendDependentPluginKeys(otherPlugin.getKey(), appendTo);
          }
        }
      }
    }
  }
440654
function addPlugin(config, pluginName, version) {
    // For default plugin, we only ensure it is enabled
    if (isDefaultPlugin(pluginName, version)) {
        return togglePlugin(config, pluginName, true);
    }

    var deps = config.getPluginDependencies();
    var dep = PluginDependency.create(pluginName, version);

    deps = deps.push(dep);
    return config.setPluginDependencies(deps);
}
62871
def register_plugin(self):
        """"""
        self.focus_changed.connect(self.main.plugin_focus_changed)
        self.main.add_dockwidget(self)
        self.main.console.set_help(self)

        self.internal_shell = self.main.console.shell
        self.console = self.main.console
650950
def refresh_plugin(self, new_path=None, force_current=True):
        """"""
        self.fileexplorer.treewidget.update_history(new_path)
        self.fileexplorer.treewidget.refresh(new_path,
                                             force_current=force_current)
278857
def plugins(all, plugins_dir):
    ""
    app = Datasette([], plugins_dir=plugins_dir)
    click.echo(json.dumps(app.plugins(all), indent=4))
1178006
def add_resolved_links(store, drop_defaults):
    """"""
    for widget_id, widget in Widget.widgets.items(): # go over all widgets
        if isinstance(widget, Link) and widget_id not in store:
            if widget.source[0].model_id in store and widget.target[0].model_id in store:
                store[widget.model_id] = widget._get_embed_state(drop_defaults=drop_defaults)
342286
def setup
      ensure_not_in_dest

      plugin_manager.conscientious_require

      self.converters = instantiate_subclasses(Bunto::Converter)
      self.generators = instantiate_subclasses(Bunto::Generator)
    end