force check for update after import settings (IDEA-99559)

This commit is contained in:
Anna Kozlova
2013-01-23 13:11:46 +04:00
parent ee062aa07b
commit 3cbda36a85
2 changed files with 7 additions and 0 deletions
@@ -32,6 +32,7 @@ import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.components.ExportableComponent;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.updateSettings.impl.UpdateSettings;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.util.io.ZipUtil;
@@ -103,6 +104,8 @@ public class ImportSettingsAction extends AnAction implements DumbAware {
StartupActionScriptManager.ActionCommand deleteTemp = new StartupActionScriptManager.DeleteCommand(tempFile);
StartupActionScriptManager.addActionCommand(deleteTemp);
UpdateSettings.getInstance().forceCheckForUpdateAfterRestart();
String key = ApplicationManager.getApplication().isRestartCapable()
? "message.settings.imported.successfully.restart"
: "message.settings.imported.successfully";
@@ -129,4 +129,8 @@ public class UpdateSettings implements PersistentStateComponent<Element>, UserUp
public ChannelStatus getSelectedChannelStatus() {
return ChannelStatus.fromCode(UPDATE_CHANNEL_TYPE);
}
public void forceCheckForUpdateAfterRestart() {
LAST_TIME_CHECKED = 0;
}
}