Changeset 33887 in osm for applications/editors/josm/plugins/indoorhelper/src/org
- Timestamp:
- 2017-11-25T01:25:40+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/indoorhelper/src/org/openstreetmap/josm/plugins/indoorhelper/IndoorHelperPlugin.java
r32637 r33887 23 23 import java.io.InputStream; 24 24 import java.io.OutputStream; 25 25 26 import org.openstreetmap.josm.Main; 26 27 import org.openstreetmap.josm.gui.MapFrame; … … 33 34 /** 34 35 * This is the main class for the indoorhelper plug-in. 35 * 36 * 36 37 * @author egru 37 * 38 * 38 39 */ 39 40 public class IndoorHelperPlugin extends Plugin { … … 46 47 /** 47 48 * Constructor for the plug-in. 48 * 49 * 49 50 * Exports the needed files and adds them to the settings. 50 * 51 * 51 52 * @param info general information about the plug-in 52 53 */ 53 54 public IndoorHelperPlugin(PluginInformation info) throws Exception { 54 super(info); 55 super(info); 55 56 56 57 this.exportValidator("/data/indoorhelper.validator.mapcss"); … … 72 73 } 73 74 } 74 75 75 76 /** 76 77 * Exports the mapcss validator file to the preferences directory. … … 92 93 byte[] buffer = new byte[4096]; 93 94 94 String valDirPath = Main.pref.getUserDataDirectory() + sep + "validator"; 95 String valDirPath = Main.pref.getDirs().getUserDataDirectory(false) + sep + "validator"; 95 96 File valDir = new File(valDirPath); 96 97 valDir.mkdirs(); … … 107 108 } finally { 108 109 stream.close(); 109 } 110 } 110 111 } 111 112 … … 128 129 byte[] buffer = new byte[4096]; 129 130 130 String valDirPath = Main.pref.getUserDataDirectory() + sep + "styles"; 131 String valDirPath = Main.pref.getDirs().getUserDataDirectory(false) + sep + "styles"; 131 132 File valDir = new File(valDirPath); 132 133 valDir.mkdirs(); … … 143 144 } finally { 144 145 stream.close(); 145 } 146 } 146 147 } 147 148 148 149 /** 149 150 * Writes the indoor validator file in the user preferences if it isn't there … … 179 180 // indoorValidator.put("title", "Indoor"); 180 181 // indoorValidator.put("active", "true"); 181 // indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" + 182 // indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" + 182 183 // sep + "indoorhelper.validator.mapcss"); 183 184 // 184 185 // validatorMapsNew.add(indoorValidator); 185 186 // Main.pref.putListOfStructs 186 // ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", 187 // ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", 187 188 // validatorMapsNew); 188 189 // }
Note:
See TracChangeset
for help on using the changeset viewer.
