diff --git a/platform/core-api/src/com/intellij/openapi/components/RoamingType.java b/platform/core-api/src/com/intellij/openapi/components/RoamingType.java index ba4b6d8b36e6..6ee6251eed1a 100644 --- a/platform/core-api/src/com/intellij/openapi/components/RoamingType.java +++ b/platform/core-api/src/com/intellij/openapi/components/RoamingType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,12 +16,29 @@ package com.intellij.openapi.components; public enum RoamingType { + /** + * Stored only locally, not shared. + */ DISABLED, - PER_PLATFORM, + /** + * Stored per operating system (Mac OS X, Linux, FreeBSD, Unix, Windows) + */ + PER_OS, + + /** + * Default, shared. + */ + PER_USER, + @Deprecated /** * Use {@link #PER_USER} instead */ GLOBAL, - PER_USER + + @Deprecated + /** + * Use {@link #PER_OS} instead + */ + PER_PLATFORM, } diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/impl/libraries/ExportableApplicationLibraryTable.java b/platform/lang-impl/src/com/intellij/openapi/roots/impl/libraries/ExportableApplicationLibraryTable.java index b45e85a7d049..a89420942fc4 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/impl/libraries/ExportableApplicationLibraryTable.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/impl/libraries/ExportableApplicationLibraryTable.java @@ -25,7 +25,7 @@ import com.intellij.openapi.components.StoragePathMacros; */ @State( name = "libraryTable", - storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/applicationLibraries.xml", roamingType = RoamingType.PER_PLATFORM) + storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/applicationLibraries.xml", roamingType = RoamingType.PER_OS) ) public class ExportableApplicationLibraryTable extends ApplicationLibraryTable { } diff --git a/platform/lang-impl/src/com/intellij/ui/debugger/extensions/PlaybackDebugger.java b/platform/lang-impl/src/com/intellij/ui/debugger/extensions/PlaybackDebugger.java index 383e50cb874d..7b181a8c26b5 100644 --- a/platform/lang-impl/src/com/intellij/ui/debugger/extensions/PlaybackDebugger.java +++ b/platform/lang-impl/src/com/intellij/ui/debugger/extensions/PlaybackDebugger.java @@ -495,7 +495,7 @@ public class PlaybackDebugger implements UiDebuggerExtension, PlaybackRunner.Sta @State( name = "PlaybackDebugger", - storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/playbackDebugger.xml", roamingType = RoamingType.PER_PLATFORM) + storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/playbackDebugger.xml", roamingType = RoamingType.PER_OS) ) public static class PlaybackDebuggerState implements PersistentStateComponent { @Attribute diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java index 27f9f3a8e631..d60ef47588e7 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/LafManagerImpl.java @@ -87,7 +87,7 @@ import java.util.List; @State( name = "LafManager", storages = { - @Storage(file = StoragePathMacros.APP_CONFIG + "/laf.xml", roamingType = RoamingType.PER_PLATFORM), + @Storage(file = StoragePathMacros.APP_CONFIG + "/laf.xml", roamingType = RoamingType.PER_OS), @Storage(file = StoragePathMacros.APP_CONFIG + "/options.xml", deprecated = true) } ) diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/AbbreviationManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/AbbreviationManagerImpl.java index 0016d909ede8..4b00a74da2ac 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/AbbreviationManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/AbbreviationManagerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import java.util.*; */ @State( name = "AbbreviationManager", - storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/abbreviations.xml", roamingType = RoamingType.PER_PLATFORM)} + storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/abbreviations.xml", roamingType = RoamingType.PER_OS)} ) public class AbbreviationManagerImpl extends AbbreviationManager implements PersistentStateComponent { private final Map> myAbbreviation2ActionId = new THashMap>(); diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/KeymapManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/KeymapManagerImpl.java index 5384764ba79b..98a355433f9a 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/KeymapManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/KeymapManagerImpl.java @@ -40,7 +40,7 @@ import java.util.*; @State( name = "KeymapManager", - storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/keymap.xml", roamingType = RoamingType.PER_PLATFORM), + storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/keymap.xml", roamingType = RoamingType.PER_OS), additionalExportFile = KeymapManagerImpl.KEYMAPS_DIR_PATH ) public class KeymapManagerImpl extends KeymapManagerEx implements PersistentStateComponent, ApplicationComponent { diff --git a/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosImpl.java b/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosImpl.java index 9e287abfe024..ee8430d41a9d 100644 --- a/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosImpl.java +++ b/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosImpl.java @@ -35,7 +35,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; @State( name = "PathMacrosImpl", - storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/path.macros.xml", roamingType = RoamingType.PER_PLATFORM) + storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/path.macros.xml", roamingType = RoamingType.PER_OS) ) public class PathMacrosImpl extends PathMacros implements PersistentStateComponent { private static final Logger LOG = Logger.getInstance(PathMacrosImpl.class); diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsApplicationSettings.java b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsApplicationSettings.java index acd28158412f..04e307d24641 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/VcsApplicationSettings.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/VcsApplicationSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import com.intellij.openapi.components.*; import com.intellij.util.xmlb.XmlSerializerUtil; /** - * We don't use roaming type PER_PLATFORM - path macros is enough ($USER_HOME$/Dropbox for example) + * We don't use roaming type PER_OS - path macros is enough ($USER_HOME$/Dropbox for example) */ @State( name = "VcsApplicationSettings", diff --git a/plugins/ShortcutPromoter/src/com/intellij/promoter/ShortcutPromoterManager.java b/plugins/ShortcutPromoter/src/com/intellij/promoter/ShortcutPromoterManager.java index 684852b7a77e..cdac4ffc024b 100644 --- a/plugins/ShortcutPromoter/src/com/intellij/promoter/ShortcutPromoterManager.java +++ b/plugins/ShortcutPromoter/src/com/intellij/promoter/ShortcutPromoterManager.java @@ -22,7 +22,7 @@ import java.util.Map; */ @State( name = "ShortcutPromoterManager", - storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/promoter.xml", roamingType = RoamingType.PER_PLATFORM) + storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/promoter.xml", roamingType = RoamingType.PER_OS) ) public class ShortcutPromoterManager implements ApplicationComponent, AnActionListener, PersistentStateComponent { private final Map myState = new LinkedHashMap(); diff --git a/plugins/git4idea/src/git4idea/config/GitVcsApplicationSettings.java b/plugins/git4idea/src/git4idea/config/GitVcsApplicationSettings.java index 38093f7b068a..829a3ac260d5 100644 --- a/plugins/git4idea/src/git4idea/config/GitVcsApplicationSettings.java +++ b/plugins/git4idea/src/git4idea/config/GitVcsApplicationSettings.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable; @State( name = "Git.Application.Settings", storages = { - @Storage(file = StoragePathMacros.APP_CONFIG + "/git.xml", roamingType = RoamingType.PER_PLATFORM), + @Storage(file = StoragePathMacros.APP_CONFIG + "/git.xml", roamingType = RoamingType.PER_OS), @Storage(file = StoragePathMacros.APP_CONFIG + "/vcs.xml", deprecated = true) } ) diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/HgGlobalSettings.java b/plugins/hg4idea/src/org/zmlx/hg4idea/HgGlobalSettings.java index 5682d483209e..14b733a8588a 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/HgGlobalSettings.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/HgGlobalSettings.java @@ -26,7 +26,7 @@ import java.util.Map; @State( name = "HgGlobalSettings", storages = { - @Storage(file = StoragePathMacros.APP_CONFIG + "/hg.xml", roamingType = RoamingType.PER_PLATFORM), + @Storage(file = StoragePathMacros.APP_CONFIG + "/hg.xml", roamingType = RoamingType.PER_OS), @Storage(file = StoragePathMacros.APP_CONFIG + "/vcs.xml", deprecated = true) } ) diff --git a/plugins/settings-repository/src/IcsUrlBuilder.kt b/plugins/settings-repository/src/IcsUrlBuilder.kt index 1e036c491c25..22d401bea26c 100644 --- a/plugins/settings-repository/src/IcsUrlBuilder.kt +++ b/plugins/settings-repository/src/IcsUrlBuilder.kt @@ -6,8 +6,8 @@ import com.intellij.openapi.util.SystemInfo val PROJECTS_DIR_NAME: String = "_projects/" private fun getOsFolderName() = when { - SystemInfo.isWindows -> "_windows" SystemInfo.isMac -> "_mac" + SystemInfo.isWindows -> "_windows" SystemInfo.isLinux -> "_linux" SystemInfo.isFreeBSD -> "_freebsd" SystemInfo.isUnix -> "_unix" @@ -15,7 +15,7 @@ private fun getOsFolderName() = when { } fun buildPath(path: String, roamingType: RoamingType, projectKey: String? = null): String { - fun String.osIfNeed() = if (roamingType == RoamingType.PER_PLATFORM) "${getOsFolderName()}/$this" else this + fun String.osIfNeed() = if (roamingType == RoamingType.PER_OS) "${getOsFolderName()}/$this" else this return if (projectKey == null) { (if (path.charAt(0) == '$') path else "\$ROOT_CONFIG$/$path").osIfNeed()