Get the list of all plugins - available and installed.
@return The list of all plugins - available and installed.
330993
@Restricted(DoNotUse.class) // WebOnly
    public HttpResponse doPlugins() {
        Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
        JSONArray response = new JSONArray();
        Map<String,JSONObject> allPlugins = new HashMap<>();
        for (PluginWrapper plugin : plugins) {
            JSONObject pluginInfo = new JSONObject();
            pluginInfo.put("installed", true);
            pluginInfo.put("name", plugin.getShortName());
            pluginInfo.put("title", plugin.getDisplayName());
            pluginInfo.put("active", plugin.isActive());
            pluginInfo.put("enabled", plugin.isEnabled());
            pluginInfo.put("bundled", plugin.isBundled);
            pluginInfo.put("deleted", plugin.isDeleted());
            pluginInfo.put("downgradable", plugin.isDowngradable());
            pluginInfo.put("website", plugin.getUrl());
            List<Dependency> dependencies = plugin.getDependencies();
            if (dependencies != null && !dependencies.isEmpty()) {
                Map<String, String> dependencyMap = new HashMap<>();
                for (Dependency dependency : dependencies) {
                    dependencyMap.put(dependency.shortName, dependency.version);
                }
                pluginInfo.put("dependencies", dependencyMap);
            } else {
                pluginInfo.put("dependencies", Collections.emptyMap());
            }
            response.add(pluginInfo);
        }
        for (UpdateSite site : Jenkins.getActiveInstance().getUpdateCenter().getSiteList()) {
            for (UpdateSite.Plugin plugin: site.getAvailables()) {
                JSONObject pluginInfo = allPlugins.get(plugin.name);
                if(pluginInfo == null) {
			pluginInfo = new JSONObject();
			pluginInfo.put("installed", false);
                }
                pluginInfo.put("name", plugin.name);
                pluginInfo.put("title", plugin.getDisplayName());
                pluginInfo.put("excerpt", plugin.excerpt);
                pluginInfo.put("site", site.getId());
                pluginInfo.put("dependencies", plugin.dependencies);
                pluginInfo.put("website", plugin.wiki);
                response.add(pluginInfo);
            }
        }
        return hudson.util.HttpResponses.okJSON(response);
    }
399848
private Map<AddonId, AddonRepository> getInstalledAddons()
   {
      Map<AddonId, AddonRepository> addons = new HashMap<>();
      for (AddonRepository repository : getRepositories())
      {
         List<AddonId> listEnabled = repository.listAll();
         for (AddonId addonId : listEnabled)
         {
            addons.put(addonId, repository);
         }
      }
      return addons;
   }
867165
public static function getAllPluginsNames()
    {
        $pluginList = StaticContainer::get('Piwik\Application\Kernel\PluginList');

        $pluginsToLoad = array_merge(
            self::getInstance()->readPluginsDirectory(),
            $pluginList->getCorePluginsDisabledByDefault()
        );
        $pluginsToLoad = array_values(array_unique($pluginsToLoad));
        return $pluginsToLoad;
    }
247135
def GetPlugins(cls):
    
    for plugin_name, plugin_class in iter(cls._plugin_classes.items()):
      yield plugin_name, plugin_class
368721
function list() {
  return installer.listPlugins(function(listErr, plugins) {
    if (listErr) {
      return out.error("error : %s", listErr);
    }
    if (plugins.length === 0) {
      return out.success("no plugins found");
    }
    var string = "";
    for (var idx = 0; idx < plugins.length; idx++) {
      string += "  " + (idx + 1) + ".  " + plugins[idx].name +
        " - " + plugins[idx].description + "\n";
    }
    return out.success("installed plugins:\n%s", string);
  });
}
634437
@RequestMapping(value = "/api/plugins", method = RequestMethod.GET)
    public
    @ResponseBody
    HashMap<String, Object> getPluginInformation() {
        return pluginInformation();
    }
1220997
protected function getPluggables()
    {
        $pluggables = $this->pluggable->all();
        $results = [];

        foreach ($pluggables as $pluggable) {
            $results[] = $this->getPluggableInformation($pluggable);
        }

        return array_filter($results);
    }
643609
public function getPlugins()
    {
        if ($this->_plugins === null) {
            $plugins = [];
            foreach ($this->getConfig() as $pointer => $fields) {
                if (is_array($fields)) {
                    foreach ($fields as $field) {
                        if (isset($field['type'])) {
                            $fieldName = $field['name'];
                            if (!array_key_exists($fieldName, $plugins)) {
                                $plugins[$fieldName] = $field;
                            }
                        }
                    }
                }
            }
            $this->_plugins = $plugins;
        }

        return $this->_plugins;
    }
236759
public function getLoadedPluginPaths()
    {
        $pluginPaths = [];

        $plugins = Plugin::loaded() ?? [];
        foreach ($plugins as $p) {
            // @TODO load active plugins from plugin manager
            if (in_array($p, ['DebugKit', 'Migrations'])) {
                continue;
            }
            $pluginPaths[$p] = Plugin::path($p);
        }

        return $pluginPaths;
    }
545314
public static function get_enabled_plugins() {
        global $DB, $CFG;
        require_once("$CFG->libdir/filterlib.php");

        $enabled = array();
        $filters = $DB->get_records_select('filter_active', "active <> :disabled AND contextid = :contextid", array(
            'disabled' => TEXTFILTER_DISABLED, 'contextid' => \context_system::instance()->id), 'filter ASC', 'id, filter');
        foreach ($filters as $filter) {
            $enabled[$filter->filter] = $filter->filter;
        }

        return $enabled;
    }
38565
public java.util.List<FunctionConfiguration> getFunctions() {
        if (functions == null) {
            functions = new com.amazonaws.internal.SdkInternalList<FunctionConfiguration>();
        }
        return functions;
    }
994874
public List<MoskitoPlugin> getPlugins() {
		ArrayList<MoskitoPlugin> ret = new ArrayList<MoskitoPlugin>(plugins.values());
		return ret;
	}
1255850
function get_installed_addons() {
            $installed_addons = array();
            foreach ( self::$_instances as $instance ) {
                if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
                    if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
                        $installed_addons[] = $instance;
                    }
                }
            }

            return $installed_addons;
        }
652835
@Exported
    public List<Plugin> getUpdates() {
        Data data = getData();
        if(data==null)      return Collections.emptyList(); // fail to determine
        
        List<Plugin> r = new ArrayList<>();
        for (PluginWrapper pw : Jenkins.getInstance().getPluginManager().getPlugins()) {
            Plugin p = pw.getUpdateInfo();
            if(p!=null) r.add(p);
        }
        
        return r;
    }
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());
		}
	}
1171429
def getPluginsList(self, enable=True):
        
        if enable:
            return [p for p in self._plugins if self._plugins[p].is_enable()]
        else:
            return [p for p in self._plugins]
1026999
def get_plugins() -> Dict[str, pkg_resources.EntryPoint]:
        
        return {entry.name: entry for entry in pkg_resources.iter_entry_points('unidown.plugin')}