plugin advertiser: do not suggest to restart if no plugins were installed/enabled

This commit is contained in:
anna
2013-10-23 13:43:43 +02:00
parent 9ba5f92262
commit dbc3985de3
@@ -92,17 +92,21 @@ public class PluginsAdvertiserDialog extends DialogWrapper {
PluginManagerMain.notifyPluginsWereInstalled(null, myProject);
}
};
try {
PluginManagerMain.downloadPlugins(nodes, myAllPlugins, notifyRunnable, null);
}
catch (IOException e) {
LOG.error(e);
}
for (IdeaPluginDescriptor pluginDescriptor : pluginsToEnable) {
PluginManagerCore.enablePlugin(pluginDescriptor.getPluginId().getIdString());
}
if (nodes.isEmpty()) {
notifyRunnable.run();
if (!nodes.isEmpty()) {
try {
PluginManagerMain.downloadPlugins(nodes, myAllPlugins, notifyRunnable, null);
}
catch (IOException e) {
LOG.error(e);
}
}
else {
if (!pluginsToEnable.isEmpty()) {
notifyRunnable.run();
}
}
super.doOKAction();
}