}
customDetectorsInitialized = true;
DetectorValidator validator = new DetectorValidator();
final SortedSet<String> detectorPaths = new TreeSet<String>();
SortedMap<String, String> contributedDetectors = DetectorsExtensionHelper.getContributedDetectors();
UserPreferences corePreferences = getCorePreferences(null, false);
detectorPaths.addAll(corePreferences.getCustomPlugins(true));
if(DEBUG) {
dumpClassLoader(FindbugsPlugin.class);
dumpClassLoader(Plugin.class);
System.out.println("applyCustomDetectors - going to add " + detectorPaths.size() + " plugin urls...");
for (String url : detectorPaths) {
System.out.println("\t" + url);
}
}
// disable custom plugins configured via properties, if they are already loaded
Set<String> disabledPlugins = corePreferences.getCustomPlugins(false);
Map<URI, Plugin> allPlugins = Plugin.getAllPluginsMap();
for (Entry<URI, Plugin> entry : allPlugins.entrySet()) {
Plugin fbPlugin = entry.getValue();
String pluginId = fbPlugin.getPluginId();
// ignore all custom plugins with the same plugin id as already loaded