mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
HgGlobalSettings must be per platform
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user