clear cached installation status in place, otherwise it would be cleared after leaving modal context only (IDEA-86090)

This commit is contained in:
Anna Kozlova
2012-05-15 16:14:30 +04:00
parent 612d3eefcc
commit b66e463eb6
2 changed files with 9 additions and 15 deletions
@@ -67,6 +67,7 @@ public class PluginInstaller {
Messages.showErrorDialog(pluginNode.getName() + ": " + e.getMessage(), CommonBundle.message("title.error"));
}
});
return false;
}
}
return result;
@@ -300,22 +300,15 @@ public abstract class PluginManagerMain implements Disposable {
ProgressManager.getInstance().run(new Task.Backgroundable(null, IdeBundle.message("progress.download.plugins"), true) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
if (PluginInstaller.prepareToInstall(plugins, allPlugins)) {
ApplicationManager.getApplication().invokeLater(onSuccess);
result[0] = true;
try {
if (PluginInstaller.prepareToInstall(plugins, allPlugins)) {
ApplicationManager.getApplication().invokeLater(onSuccess);
result[0] = true;
}
}
finally {
cleanup.run();
}
}
@Override
public void onCancel() {
cleanup.run();
super.onCancel();
}
@Override
public void onSuccess() {
super.onSuccess();
cleanup.run();
}
});
}