EnabledSettings isEnabled(@CheckForNull Project project, Plugin plugin) { return new EnabledSettings(plugin.isGloballyEnabled(), project == null ? null : project.getPluginStatus(plugin)); }
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; }
continue; Boolean fbPluginStatus = project.getPluginStatus(plugin); if ((!c.isHidden() || c.getId().equals(cloudId)) && !Boolean.FALSE.equals(fbPluginStatus)) { cloudSelector.addItem(c);
if (project != null) { Boolean newSetting = enabled.project; Boolean existingSetting = project.getPluginStatus(plugin); boolean sameSettings = Objects.equals(existingSetting, newSetting); if (!sameSettings) {