IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 620 | 620 | */ |
| 621 | 621 | private void init() throws IOException { |
| 622 | 622 | Logging.setLogLevel(Logging.LEVEL_INFO); |
| 623 | | Preferences.main().enableSaveOnPut(false); |
| | 623 | Preferences.main().disableSaveOnPut(); |
| 624 | 624 | Config.setPreferencesInstance(Preferences.main()); |
| 625 | 625 | Config.setBaseDirectoriesProvider(JosmBaseDirectories.getInstance()); |
| 626 | 626 | Config.setUrlsProvider(JosmUrls.getInstance()); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 914 | 914 | /** |
| 915 | 915 | * Enables or not the preferences file auto-save mechanism (save each time a setting is changed). |
| 916 | 916 | * This behaviour is enabled by default. |
| | 917 | * |
| 917 | 918 | * @param enable if {@code true}, makes JOSM save preferences file each time a setting is changed |
| | 919 | * @deprecated use {@link Preferences#disableSaveOnPut()} or {@link Preferences#enableSaveOnPut()} |
| 918 | 920 | * @since 7085 |
| 919 | 921 | */ |
| | 922 | @Deprecated(since = "16726") |
| 920 | 923 | public final void enableSaveOnPut(boolean enable) { |
| 921 | 924 | synchronized (this) { |
| 922 | 925 | saveOnPut = enable; |
| 923 | 926 | } |
| 924 | 927 | } |
| | 928 | |
| | 929 | /** |
| | 930 | * Enables the preferences file auto-save mechanism (save each time a setting is changed). |
| | 931 | * This behaviour is the default. |
| | 932 | * |
| | 933 | * @since 16726 |
| | 934 | */ |
| | 935 | public void enableSaveOnPut() { |
| | 936 | enableSaveOnPut(true); |
| | 937 | } |
| | 938 | |
| | 939 | /** |
| | 940 | * Disables the preferences file auto-save mechanism (save each time a setting is changed). |
| | 941 | * |
| | 942 | * @since 16726 |
| | 943 | */ |
| | 944 | public void disableSaveOnPut() { |
| | 945 | enableSaveOnPut(false); |
| | 946 | } |
| 925 | 947 | } |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 88 | 88 | // Test 2 - read(file, pref) + replace |
| 89 | 89 | Preferences pref = new Preferences(); |
| 90 | 90 | // avoid messing up preferences file (that makes all following unit tests fail) |
| 91 | | pref.enableSaveOnPut(false); |
| | 91 | pref.disableSaveOnPut(); |
| 92 | 92 | pref.putList("lorem_ipsum", Arrays.asList("only 1 string")); |
| 93 | 93 | assertEquals(1, pref.getList("lorem_ipsum").size()); |
| 94 | 94 | CustomConfigurator.readXML(new File(TestUtils.getTestDataRoot() + "customconfigurator", "replace.xml"), pref); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 525 | 525 | final Map<String, Setting<?>> defaultsMap = (Map<String, Setting<?>>) TestUtils.getPrivateField(pref, "defaultsMap"); |
| 526 | 526 | defaultsMap.clear(); |
| 527 | 527 | pref.resetToInitialState(); |
| 528 | | pref.enableSaveOnPut(false); |
| | 528 | pref.disableSaveOnPut(); |
| 529 | 529 | // No pref init -> that would only create the preferences file. |
| 530 | 530 | // We force the use of a wrong API server, just in case anyone attempts an upload |
| 531 | 531 | Config.getPref().put("osm-server.url", "http://invalid"); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 112 | 112 | Config.setUrlsProvider(JosmUrls.getInstance()); |
| 113 | 113 | HttpClient.setFactory(Http1Client::new); |
| 114 | 114 | pref.resetToInitialState(); |
| 115 | | pref.enableSaveOnPut(false); |
| | 115 | pref.disableSaveOnPut(); |
| 116 | 116 | I18n.init(); |
| 117 | 117 | // initialize the plaform hook, and |
| 118 | 118 | // call the really early hook before we anything else |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 173 | 173 | public static void setUpBeforeClass() { |
| 174 | 174 | if (!isInitialized) { |
| 175 | 175 | //System.setProperty("josm.home", "test/data/preferences"); |
| 176 | | Preferences.main().enableSaveOnPut(false); |
| | 176 | Preferences.main().disableSaveOnPut(); |
| 177 | 177 | I18n.init(); |
| 178 | 178 | Preferences.main().init(false); |
| 179 | 179 | I18n.set(Config.getPref().get("language", "en")); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 38 | 38 | public static synchronized void initPlugin() { |
| 39 | 39 | if (!isInitialized) { |
| 40 | 40 | System.setProperty("josm.home", "test/data/preferences"); |
| 41 | | Preferences.main().enableSaveOnPut(false); |
| | 41 | Preferences.main().disableSaveOnPut(); |
| 42 | 42 | I18n.init(); |
| 43 | 43 | PlatformManager.getPlatform().preStartupHook(); |
| 44 | 44 | Preferences.main().init(false); |