Changeset 13023 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-10-18T18:18:33+02:00 (7 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r12846 r13023 37 37 import org.openstreetmap.josm.data.osm.DataSet; 38 38 import org.openstreetmap.josm.data.osm.OsmPrimitive; 39 import org.openstreetmap.josm.data.preferences.JosmBaseDirectories; 39 40 import org.openstreetmap.josm.data.projection.Projection; 40 41 import org.openstreetmap.josm.data.projection.ProjectionChangeListener; … … 115 116 * Global application preferences 116 117 */ 117 public static final Preferences pref = new Preferences(); 118 public static final Preferences pref = new Preferences(JosmBaseDirectories.getInstance()); 118 119 119 120 /** -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r13021 r13023 42 42 import org.openstreetmap.josm.data.preferences.IntegerProperty; 43 43 import org.openstreetmap.josm.data.preferences.ColorInfo; 44 import org.openstreetmap.josm.data.preferences.JosmBaseDirectories;45 44 import org.openstreetmap.josm.data.preferences.LongProperty; 46 45 import org.openstreetmap.josm.data.preferences.NamedColorProperty; … … 464 463 */ 465 464 public File getPreferenceFile() { 466 return new File(getPreferencesDirectory(false), "preferences.xml"); 465 return new File(dirs.getPreferencesDirectory(false), "preferences.xml"); 467 466 } 468 467 … … 472 471 */ 473 472 public File getDefaultsCacheFile() { 474 return new File(getCacheDirectory(true), "default_preferences.xml"); 473 return new File(dirs.getCacheDirectory(true), "default_preferences.xml"); 475 474 } 476 475 … … 480 479 */ 481 480 public File getPluginsDirectory() { 482 return new File(getUserDataDirectory(false), "plugins"); 481 return new File(dirs.getUserDataDirectory(false), "plugins"); 483 482 } 484 483 … … 519 518 public Collection<String> getAllPossiblePreferenceDirs() { 520 519 Set<String> locations = new HashSet<>(); 521 addPossibleResourceDir(locations, getPreferencesDirectory(false).getPath()); 522 addPossibleResourceDir(locations, getUserDataDirectory(false).getPath()); 520 addPossibleResourceDir(locations, dirs.getPreferencesDirectory(false).getPath()); 521 addPossibleResourceDir(locations, dirs.getUserDataDirectory(false).getPath()); 523 522 addPossibleResourceDir(locations, System.getenv("JOSM_RESOURCES")); 524 523 addPossibleResourceDir(locations, System.getProperty("josm.resources")); … … 818 817 initSuccessful = false; 819 818 // get the preferences. 820 File prefDir = getPreferencesDirectory(false); 819 File prefDir = dirs.getPreferencesDirectory(false); 821 820 if (prefDir.exists()) { 822 821 if (!prefDir.isDirectory()) {
Note:
See TracChangeset
for help on using the changeset viewer.