// Look for new plugins
boolean newPluginsFound = false;
for (Iterator i = newLoadedPlugins.entrySet().iterator(); i.hasNext();) {
Map.Entry ent = (Map.Entry) i.next();
if (!currentlyLoadedPlugins.containsKey(ent.getKey())) {
ExtensionDescriptor des = (ExtensionDescriptor) newLoadedPlugins.get(ent.getKey());
des.getApplicationBundle().setType(ExtensionBundle.TYPE_PENDING_INSTALLATION);
newPluginsFound = true;
}
}
if (newPluginsFound) {
GlobalWarningManager.getInstance().addMultipleGlobalWarning(new GlobalWarning(GlobalWarning.MANAGEMENT_USERS, new BundleActionMessage("extensions",
"extensionStore.message.pluginInstalledRestartRequired"), DismissType.DISMISS_FOR_USER));
}
// Look for new extensions
Map newLoadedExtensions = getLoadedExtensions();
// Look for extension updates
File updatedExtensionsDir = ExtensionStore.getInstance().getUpdatedExtensionsDirectory();
boolean updatesFound = false;
for (Iterator i = newLoadedExtensions.entrySet().iterator(); i.hasNext();) {
Map.Entry ent = (Map.Entry) i.next();
if (new File(updatedExtensionsDir, (String) ent.getKey()).exists()) {
final ExtensionBundle bundle = (ExtensionBundle) ent.getValue();
for (Iterator j = bundle.iterator(); j.hasNext();) {
ExtensionDescriptor des = (ExtensionDescriptor) j.next();
des.getApplicationBundle().setType(ExtensionBundle.TYPE_PENDING_UPDATE);
}
updatesFound = true;
}
}
if (updatesFound) {