Changeset 33887 in osm for applications/editors/josm/plugins/indoorhelper/src/controller/IndoorHelperController.java
- Timestamp:
- 2017-11-25T01:25:40+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/indoorhelper/src/controller/IndoorHelperController.java
r33632 r33887 37 37 import org.openstreetmap.josm.data.validation.OsmValidator; 38 38 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker; 39 import org.openstreetmap.josm.gui.MainApplication; 39 40 import org.openstreetmap.josm.gui.dialogs.FilterDialog; 40 41 import org.openstreetmap.josm.gui.dialogs.FilterTableModel; … … 77 78 78 79 addToolboxListeners(); 79 Main .map.addToggleDialog(toolboxView);80 MainApplication.getMap().addToggleDialog(toolboxView); 80 81 } 81 82 … … 142 143 143 144 // Delete the indoor filters 144 FilterDialog filterDialog = Main .map.getToggleDialog(FilterDialog.class);145 FilterDialog filterDialog = MainApplication.getMap().getToggleDialog(FilterDialog.class); 145 146 146 147 if (filterDialog != null) { … … 394 395 */ 395 396 private void setPluginPreferences(boolean enabled) { 396 Collection<Map<String, String>> validatorMaps = 397 Main.pref.getListOf Structs("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",397 Collection<Map<String, String>> validatorMaps = 398 Main.pref.getListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", 398 399 new ArrayList<>()); 399 Collection<Map<String, String>> styleMaps = 400 Main.pref.getListOf Structs("mappaint.style.entries", new ArrayList<>());400 Collection<Map<String, String>> styleMaps = 401 Main.pref.getListOfMaps("mappaint.style.entries", new ArrayList<>()); 401 402 402 403 if (enabled) { … … 418 419 indoorValidator.put("title", "Indoor"); 419 420 indoorValidator.put("active", "true"); 420 indoorValidator.put("url", Main.pref.get UserDataDirectory()+ sep +"validator" +421 indoorValidator.put("url", Main.pref.getDirs().getUserDataDirectory(false)+ sep +"validator" + 421 422 sep + "indoorhelper.validator.mapcss"); 422 423 423 424 validatorMapsNew.add(indoorValidator); 424 Main.pref.putListOf Structs("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",425 Main.pref.putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", 425 426 validatorMapsNew); 426 427 … … 441 442 indoorMapPaint.put("title", "Indoor"); 442 443 indoorMapPaint.put("active", "true"); 443 indoorMapPaint.put("url", Main.pref.get UserDataDirectory() + sep + "styles"444 indoorMapPaint.put("url", Main.pref.getDirs().getUserDataDirectory(false) + sep + "styles" 444 445 + sep + "indoor.mapcss"); 445 446 styleMapsNew.add(indoorMapPaint); 446 Main.pref.putListOf Structs("mappaint.style.entries", styleMapsNew);447 Main.pref.putListOfMaps("mappaint.style.entries", styleMapsNew); 447 448 448 449 updateSettings(); … … 465 466 indoorValidator.put("title", "Indoor"); 466 467 indoorValidator.put("active", "false"); 467 indoorValidator.put("url", Main.pref.get UserDataDirectory()+ sep +"validator" +468 indoorValidator.put("url", Main.pref.getDirs().getUserDataDirectory(false)+ sep +"validator" + 468 469 sep + "indoorhelper.validator.mapcss"); 469 470 470 471 validatorMapsNew.add(indoorValidator); 471 Main.pref.putListOf Structs("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",472 Main.pref.putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", 472 473 validatorMapsNew); 473 474 … … 489 490 indoorMapPaint.put("title", "Indoor"); 490 491 indoorMapPaint.put("active", "false"); 491 indoorMapPaint.put("url", Main.pref.get UserDataDirectory() + sep + "styles"492 indoorMapPaint.put("url", Main.pref.getDirs().getUserDataDirectory(false) + sep + "styles" 492 493 + sep + "indoor.mapcss"); 493 494 styleMapsNew.add(indoorMapPaint); 494 Main.pref.putListOf Structs("mappaint.style.entries", styleMapsNew);495 Main.pref.putListOfMaps("mappaint.style.entries", styleMapsNew); 495 496 496 497 updateSettings();
Note:
See TracChangeset
for help on using the changeset viewer.