private DetectorFactoryCollection( boolean loadCore, boolean forceLoad, @Nonnull Collection<Plugin> pluginsToLoad, @Nonnull Collection<Plugin> enabledPlugins) { if (loadCore) { loadCorePlugin(); } for (Plugin plugin : pluginsToLoad) { if (forceLoad || plugin.isGloballyEnabled() && !plugin.isCorePlugin()) { loadPlugin(plugin); if (!enabledPlugins.contains(plugin)) { enabledPlugins.add(plugin); } } } setGlobalOptions(); updateChecker = new UpdateChecker(this); pluginsToUpdate = combine(enabledPlugins); // There are too many places where the detector factory collection can be created, // and in many cases it has nothing to do with update checks, like Plugin#addCustomPlugin(URI). // Line below commented to allow custom plugins be loaded/registered BEFORE we // start to update something. The reason is that custom plugins // can disable update globally OR just will be NOT INCLUDED in the update check! // updateChecker.checkForUpdates(pluginsToUpdate, false); }
private void loadCorePlugin() { Plugin plugin = PluginLoader.getCorePluginLoader().getPlugin(); loadPlugin(plugin); corePlugin = plugin; }