public @CheckForNull Plugin getParentPlugin() { if (getPluginLoader().hasParent()) { return Plugin.getByPluginId(getPluginLoader().parentId); } return null; }
throw new IllegalArgumentException("Can't specify parentid " + parentId + " and provide a separate class loader"); Plugin parentPlugin = Plugin.getByPluginId(parentId); if (parentPlugin != null) { parent = parentPlugin.getClassLoader();
assert pluginLoader.hasParent(); String parentid = pluginLoader.parentId; Plugin parent = Plugin.getByPluginId(parentid); if (parent != null) { i.remove();
Plugin existingPlugin = Plugin.getByPluginId(pluginId); URL u = existingPlugin == null ? null : existingPlugin.getPluginLoader().getURL(); if (cannotDisable && initialPlugin) {
String pluginId = e.getKey(); Boolean enabled = e.getValue(); Plugin plugin = Plugin.getByPluginId(pluginId); if (plugin == null || enabled == null) { continue;
public @CheckForNull Plugin getParentPlugin() { if (getPluginLoader().hasParent()) { return Plugin.getByPluginId(getPluginLoader().parentId); } return null; }
private static void enablePlugins(Iterable<String> plugins, boolean enabled) { for (String pid : plugins) { Plugin plugin = Plugin.getByPluginId(pid); if (plugin != null) { if (!enabled && plugin.cannotDisable()) { JOptionPane.showMessageDialog(null, "Cannot disable plugin: " + plugin.getPluginId() + "\n" + plugin.getShortDescription(), "Cannot disable plugin", JOptionPane.ERROR_MESSAGE); } else { plugin.setGloballyEnabled(enabled); } } } }
assert pluginLoader.hasParent(); String parentid = pluginLoader.parentId; Plugin parent = Plugin.getByPluginId(parentid); if (parent != null) { i.remove();
throw new IllegalArgumentException("Can't specify parentid " + parentId + " and provide a seperate class loader"); Plugin parentPlugin = Plugin.getByPluginId(parentId); if (parentPlugin != null) { parent = parentPlugin.getClassLoader();
public static CloudPlugin getCloudPlugin(BugCollection bc) { CloudPlugin plugin = null; Project project = bc.getProject(); assert project != null; String cloudId = project.getCloudId(); if (cloudId != null) { plugin = DetectorFactoryCollection.instance().getRegisteredClouds().get(cloudId); if (plugin == null && FAIL_ON_CLOUD_ERROR) { throw new IllegalArgumentException("Cannot find registered cloud for " + cloudId); } } // is the desired plugin disabled for this project (and/or globally)? if so, skip it. if (plugin != null) { Plugin fbplugin = Plugin.getByPluginId(plugin.getFindbugsPluginId()); //noinspection PointlessBooleanExpression if (fbplugin != null && Boolean.FALSE.equals(project.getPluginStatus(fbplugin))) { plugin = null; // use default cloud below } } if (plugin == null) { if (DEFAULT_CLOUD != null) { LOGGER.log(Level.FINE, "Trying default cloud " + DEFAULT_CLOUD); } cloudId = DEFAULT_CLOUD; plugin = DetectorFactoryCollection.instance().getRegisteredClouds().get(cloudId); } return plugin; }
Plugin plugin = Plugin.getByPluginId(fbid); if (plugin == null) { continue;
Plugin existingPlugin = Plugin.getByPluginId(pluginId); URL u = existingPlugin == null ? null : existingPlugin.getPluginLoader().getURL(); if (cannotDisable && initialPlugin) {
String pluginId = e.getKey(); Boolean enabled = e.getValue(); Plugin plugin = Plugin.getByPluginId(pluginId); if (plugin == null || enabled == null) { continue;