Changeset 3587 in osm for applications/editors/josm
- Timestamp:
- 2007-07-14T21:03:50+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintPlugin.java
r2768 r3587 27 27 public MapPaintPlugin() { 28 28 String styleName = Main.pref.get("mappaint.style", "standard"); 29 styleDir = getPluginDir()+styleName+"/"; //some day we will support diferent icon directories over options29 styleDir = Main.pref.getPreferencesDir()+"plugins/mappaint/"+styleName+"/"; //some day we will support different icon directories over options 30 30 String elemStylesFile = getStyleDir()+"elemstyles.xml"; 31 32 // System.out.println("mappaint: Using style: " + styleName); 33 // System.out.println("mappaint: Using style dir: " + styleDir); 34 // System.out.println("mappaint: Using style file: " + elemStylesFile); 35 31 36 File f = new File(elemStylesFile); 32 37 if (f.exists()) 33 38 { 34 try 39 try // reading file from file system 35 40 { 41 // System.out.println("mappaint: Using style file: \"" + f + "\""); 36 42 XMLReader xmlReader = XMLReaderFactory.createXMLReader(); 37 43 ElemStyleHandler handler = new ElemStyleHandler(); … … 47 53 } 48 54 } 49 else{ //use the standart elemstyle of this style55 else{ // reading the builtin file from the plugin jar file 50 56 URL elemStylesPath = getClass().getResource("/"+styleName+"/elemstyles.xml"); 57 58 // System.out.println("mappaint: Using jar's elemstyles.xml: \"" + elemStylesPath + "\""); 51 59 if (elemStylesPath != null) 52 60 { … … 65 73 throw new RuntimeException(e); 66 74 } 67 } 75 } else { 76 System.out.println("mappaint: Couldn't find style: \"" + styleDir + "\"elemstyles.xml"); 77 } 68 78 } 69 79 }
Note:
See TracChangeset
for help on using the changeset viewer.