return;
}
// Load plugins definition file
File pluginsDefFile = new File(pluginsDir, "plugins.xml");
WGAPluginSet currentPlugins;
boolean reinstallPluginsDir = false;
if (pluginsDefFile.exists()) {
currentPlugins = WGAPluginSet.load(pluginsDefFile);
}
else {
currentPlugins = new WGAPluginSet();
reinstallPluginsDir = true;
}
currentPlugins.init(this, pluginsDir);
if (this.pluginSet != null) {
currentPlugins.importRuntimeContexts(this.pluginSet);
}
// Replace plugins field with new plugin set - This must be done before connecting plugins so plugin init/connection scripts can
// refer to already installed plugins
this.pluginSet = currentPlugins;
// Cope with default plugins. Install new, uninstall removed (must be in that order so installation can determine status of previous version)
installDefaultPlugins(currentPlugins, reinstallPluginsDir);
uninstallRemovedDefaultPlugins();
// Validate and connect plugins
currentPlugins.validatePlugins();
newConnectedDBKeys = currentPlugins.connectPlugins(domainConfigs);
// Save plugins def file
this.pluginSet.save();
// Update module registry if it is already available