Changeset 5196 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2012-04-16T22:53:07+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/validation/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r4968 r5196 46 46 47 47 @Override 48 public void initialize() throws Exception{48 public void initialize() { 49 49 initializePresets(); 50 50 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r4968 r5196 155 155 156 156 @Override 157 public void initialize() throws Exception {157 public void initialize() throws IOException { 158 158 initializeData(); 159 159 initializePresets(); … … 286 286 * Reads the presets data. 287 287 * 288 * @throws Exception289 288 */ 290 public static void initializePresets() throws Exception{289 public static void initializePresets() { 291 290 292 291 if (!Main.pref.getBoolean(PREF_CHECK_VALUES, true)) … … 308 307 } 309 308 for (TaggingPreset p : presets) { 310 for(TaggingPreset.Item i : p.data) { 311 if (i instanceof TaggingPreset.Combo) { 312 TaggingPreset.Combo combo = (TaggingPreset.Combo) i; 313 if (combo.values != null) { 314 for(String value : combo.values.split(",")) { 315 presetsValueData.put(combo.key, value); 316 } 317 } 318 } else if (i instanceof TaggingPreset.Key) { 319 TaggingPreset.Key k = (TaggingPreset.Key) i; 320 presetsValueData.put(k.key, k.value); 321 } else if (i instanceof TaggingPreset.Text) { 322 TaggingPreset.Text k = (TaggingPreset.Text) i; 323 presetsValueData.putVoid(k.key); 324 } else if (i instanceof TaggingPreset.Check) { 325 TaggingPreset.Check k = (TaggingPreset.Check) i; 326 presetsValueData.put(k.key, "yes"); 327 presetsValueData.put(k.key, "no"); 309 for (TaggingPreset.Item i : p.data) { 310 if (i instanceof TaggingPreset.KeyedItem) { 311 TaggingPreset.KeyedItem ky = (TaggingPreset.KeyedItem) i; 312 presetsValueData.putAll(ky.key, ky.getValues()); 328 313 } 329 314 }
Note:
See TracChangeset
for help on using the changeset viewer.