Set the plugin list according to the Glances server.
552746
def set_plugins(self, input_plugins):
        """"""
        header = "glances_"
        for item in input_plugins:
            # Import the plugin
            try:
                plugin = __import__(header + item)
            except ImportError:
                # Server plugin can not be imported from the client side
                logger.error("Can not import {} plugin. Please upgrade your Glances client/server version.".format(item))
            else:
                # Add the plugin to the dictionary
                # The key is the plugin name
                # for example, the file glances_xxx.py
                # generate self._plugins_list["xxx"] = ...
                logger.debug("Server uses {} plugin".format(item))
                self._plugins[item] = plugin.Plugin(args=self.args)
        # Restoring system path
        sys.path = sys_path
1148061
def list(self, search_opts=None):
        """"""
        query = base.get_query_string(search_opts)
        return self._list('/plugins%s' % query, 'plugins')
633199
def set_blacklisted_plugins(self, plugins):
        
        plugins = util.return_list(plugins)
        self.blacklisted_plugins = plugins
914825
def register_plugin(self):
        """"""
        self.main.restore_scrollbar_position.connect(
                                               self.restore_scrollbar_position)
        self.main.add_dockwidget(self)
369017
def setCurrentPlugin( self, plugin ):
        
        item = self.uiWizardTABLE.currentItem()
        if ( not item ):
            return None
        
        return item.plugin()
423390
def apply_plugin_settings(self, options):
        """"""
        for fig_browser in list(self.shellwidgets.values()):
            fig_browser.setup(**self.get_settings())
461721
def notify_server_ready(self, language, config):
        """"""
        for index in range(self.get_stack_count()):
            editor = self.tabs.widget(index)
            if editor.language.lower() == language:
                editor.start_lsp_services(config)
865464
def set_module_plugin_filters(self, module_plugin_filters):
        
        module_plugin_filters = util.return_list(module_plugin_filters)
        self.module_plugin_filters = module_plugin_filters
387577
public void listPlugins() {

		if( this.plugins.isEmpty()) {
			this.logger.info( "No plug-in was found for Roboconf's agent." );

		} else {
			StringBuilder sb = new StringBuilder( "Available plug-ins in Roboconf's agent: " );
			for( Iterator<PluginInterface> it = this.plugins.iterator(); it.hasNext(); ) {
				sb.append( it.next().getPluginName());
				if( it.hasNext())
					sb.append( ", " );
			}

			sb.append( "." );
			this.logger.info( sb.toString());
		}
	}
93287
function initGetList(router, adminCGIBase, pluginName, callback) {
    router.get(`${adminCGIBase}/${pluginName}`, callback);
}
872922
def set_server(self, pos, key, value):
        """"""
        self._web_list[pos][key] = value
1093370
def configure(self, args):
        
        for plug in self._plugins:
            plug_name = self.plugin_name(plug)
            plug.enabled = getattr(args, "plugin_%s" % plug_name, False)
            if plug.enabled and getattr(plug, "configure", None):
                if callable(getattr(plug, "configure", None)):
                    plug.configure(args)
        LOG.debug("Available plugins: %s", self._plugins)
        self.plugins = [plugin for plugin in self._plugins if getattr(plugin, "enabled", False)]
        LOG.debug("Enabled plugins: %s", self.plugins)
668717
def run_plugins(self):
        
        for obj in self.loader.objects:
            # Reserve a slot in the output_dict in order to ensure that the
            # items are in the correct order.
            self.output_dict[obj.output_options['name']] = None
            self.thread_manager.add_thread(obj.main, obj.options['interval'])
1182995
def list_plugins():
    '''
    
    '''
    plugin_list = os.listdir(PLUGINDIR)
    ret = []
    for plugin in plugin_list:
        # Check if execute bit
        stat_f = os.path.join(PLUGINDIR, plugin)
        execute_bit = stat.S_IXUSR & os.stat(stat_f)[stat.ST_MODE]
        if execute_bit:
            ret.append(plugin)
    return ret
683236
synchronized Plugin nextPlugin() {
    	if (!init) {
    		this.reset();
    	}
    	
        Plugin plugin = probeNextPlugin();
        if (plugin == null) {
            return null;
        }
        
        listPending.remove(plugin);
        plugin.setTimeStarted();
        listRunning.add(plugin);

        return plugin;
    }
459136
protected function setSwooleServerListeners()
    {
        foreach ($this->events as $event) {
            $listener = Str::camel("on_$event");
            $callback = method_exists($this, $listener) ? [$this, $listener] : function () use ($event) {
                $this->container->event->trigger("swoole.$event", func_get_args());
            };

            $this->container->make(Server::class)->on($event, $callback);
        }
    }
1146136
public static function set_enabled_plugins($list) {
        if (empty($list)) {
            $list = [];
        } else if (!is_array($list)) {
            $list = explode(',', $list);
        }
        if ($list) {
            $plugins = \core_plugin_manager::instance()->get_installed_plugins('media');
            $list = array_intersect($list, array_keys($plugins));
        }
        set_config('media_plugins_sortorder', join(',', $list));
        \core_plugin_manager::reset_caches();
        \core_media_manager::reset_caches();
    }