HgGlobalSettings must be per platform

This commit is contained in:
Vladimir Krivosheev
2014-10-20 10:30:22 +02:00
parent 13ed0caf69
commit 1be413e3ad
@@ -12,10 +12,7 @@
// limitations under the License.
package org.zmlx.hg4idea;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.components.*;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.containers.HashMap;
@@ -28,10 +25,13 @@ import java.util.Map;
@State(
name = "HgGlobalSettings",
storages = @Storage(file = StoragePathMacros.APP_CONFIG + "/vcs.xml")
storages = {
@Storage(file = StoragePathMacros.APP_CONFIG + "/vcs.xml"),
@Storage(file = StoragePathMacros.APP_CONFIG + "/hg.xml", roamingType = RoamingType.PER_PLATFORM)
},
storageChooser = LastStorageChooserForWrite.class
)
public class HgGlobalSettings implements PersistentStateComponent<HgGlobalSettings.State> {
@NonNls private static final String[] DEFAULT_WINDOWS_PATHS = {"C:\\Program Files\\Mercurial",
"C:\\Program Files (x86)\\Mercurial",
"C:\\cygwin\\bin"};
@@ -53,10 +53,12 @@ public class HgGlobalSettings implements PersistentStateComponent<HgGlobalSettin
public Map<String, String> myRememberedUserNames = new HashMap<String, String>();
}
@Override
public State getState() {
return myState;
}
@Override
public void loadState(State state) {
myState = state;
}