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; }
public void load() throws IOException, DocumentException { if (options.analysisFile == null) { bugCollection.readXML(UTF8.bufferedReader(System.in)); } else { bugCollection.readXML(options.analysisFile); } if (options.cloudId != null && !options.cloudId.equals(bugCollection.getProject().getCloudId())) { bugCollection.getProject().setCloudId(options.cloudId); bugCollection.reinitializeCloud(); } }
cloudSelector.setRenderer(aRenderer); cloudSelector.addItem(null); String cloudId = project.getCloudId(); CloudPlugin c = DetectorFactoryCollection.instance().getRegisteredClouds().get(project.getCloudId()); cloudSelector.setSelectedItem(c);
String oldCloudId = null; p = project; oldCloudId = project.getCloudId(); p.setGuiCallback(MainFrame.getInstance().getGuiCallback()); clearProjectSettings(p);