diff --git a/platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java b/platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java index ed53b94d45f9..2329e369d9d9 100644 --- a/platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java +++ b/platform/platform-impl/src/com/intellij/openapi/application/ConfigImportHelper.java @@ -38,6 +38,7 @@ import java.util.PropertyResourceBundle; * @author max */ public class ConfigImportHelper { + private static final String FIRST_SESSION_KEY = "intellij.first.ide.session"; private static final String CONFIG_IMPORTED_IN_CURRENT_SESSION_KEY = "intellij.config.imported.in.current.session"; private static final String BUILD_NUMBER_FILE = SystemInfo.isMac ? "/Resources/build.txt" : "build.txt"; @@ -49,6 +50,8 @@ public class ConfigImportHelper { private ConfigImportHelper() { } public static void importConfigsTo(@NotNull String newConfigPath) { + System.setProperty(FIRST_SESSION_KEY, Boolean.TRUE.toString()); + ConfigImportSettings settings = getConfigImportSettings(); File newConfigDir = new File(newConfigPath); @@ -80,6 +83,13 @@ public class ConfigImportHelper { } } + /** + * Returns {@code true} when the IDE is launched for the first time (i.e. there was no config directory). + */ + public static boolean isFirstSession() { + return Boolean.getBoolean(FIRST_SESSION_KEY); + } + /** * Returns {@code true} when the IDE is launched for the first time, and configs were imported from another installation. */ diff --git a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java index 37454618fa09..9ede86bf6706 100644 --- a/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java +++ b/platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateCheckerComponent.java @@ -77,9 +77,11 @@ public class UpdateCheckerComponent implements ApplicationComponent { if (eap && current != ChannelStatus.EAP && UpdateStrategyCustomization.getInstance().forceEapUpdateChannelForEapBuilds()) { mySettings.setSelectedChannelStatus(ChannelStatus.EAP); LOG.info("channel forced to 'eap'"); - String title = IdeBundle.message("update.notifications.title"); - String message = IdeBundle.message("update.channel.enforced", ChannelStatus.EAP); - notify(app, UpdateChecker.NOTIFICATIONS.createNotification(title, message, NotificationType.INFORMATION, null)); + if (!ConfigImportHelper.isFirstSession()) { + String title = IdeBundle.message("update.notifications.title"); + String message = IdeBundle.message("update.channel.enforced", ChannelStatus.EAP); + notify(app, UpdateChecker.NOTIFICATIONS.createNotification(title, message, NotificationType.INFORMATION, null)); + } } if (!eap && current == ChannelStatus.EAP && ConfigImportHelper.isConfigImported()) {