From 7af34f3d5d90d2ff7e9d07b6a7df3aaa2fd7c13c Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 14 Dec 2012 12:58:08 +0100 Subject: [PATCH] check for update: no need to start plugin hosts checking when connectivity problems exist (IDEA-97529) --- .../updateSettings/impl/CheckForUpdateAction.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateAction.java b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateAction.java index 315706a84900..c7b15139569e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateAction.java +++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/CheckForUpdateAction.java @@ -52,15 +52,19 @@ public class CheckForUpdateAction extends AnAction implements DumbAware { indicator.setIndeterminate(true); final CheckForUpdateResult result = UpdateChecker.checkForUpdates(instance, true); + if (result.getState() == UpdateStrategy.State.CONNECTION_ERROR) { + ApplicationManager.getApplication().invokeLater(new Runnable() { + public void run() { + UpdateChecker.showConnectionErrorDialog(); + } + }); + return; + } + final List updatedPlugins = UpdateChecker.updatePlugins(true, hostsConfigurable, indicator); ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { - if (result.getState() == UpdateStrategy.State.CONNECTION_ERROR) { - UpdateChecker.showConnectionErrorDialog(); - return; - } - instance.saveLastCheckedInfo(); UpdateChecker.showUpdateResult(result, updatedPlugins, true, enableLink, true); }