Changeset 12851 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2017-09-14T01:59:34+02:00 (3 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolutionUtil.java
r12620 r12851 15 15 import java.util.stream.Collectors; 16 16 17 import org.openstreetmap.josm. Main;18 import org.openstreetmap.josm.data. Preferences.pref;17 import org.openstreetmap.josm.data.StructUtils; 18 import org.openstreetmap.josm.data.StructUtils.StructEntry; 19 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; 20 20 import org.openstreetmap.josm.data.osm.Tag; 21 21 import org.openstreetmap.josm.data.osm.TagCollection; 22 import org.openstreetmap.josm.spi.preferences.Config; 22 23 import org.openstreetmap.josm.tools.Logging; 23 24 import org.openstreetmap.josm.tools.Pair; … … 158 159 public static Collection<AutomaticTagConflictResolver> getAutomaticTagConflictResolvers() { 159 160 if (automaticTagConflictResolvers == null) { 160 Collection<AutomaticCombine> automaticTagConflictCombines = 161 Main.pref.getListOfStructs(161 Collection<AutomaticCombine> automaticTagConflictCombines = StructUtils.getListOfStructs( 162 Config.getPref(), 162 163 "automatic-tag-conflict-resolution.combine", 163 164 defaultAutomaticTagConflictCombines, AutomaticCombine.class); 164 165 Collection<AutomaticChoiceGroup> automaticTagConflictChoiceGroups = 165 AutomaticChoiceGroup.groupChoices(Main.pref.getListOfStructs( 166 AutomaticChoiceGroup.groupChoices(StructUtils.getListOfStructs( 167 Config.getPref(), 166 168 "automatic-tag-conflict-resolution.choice", 167 169 defaultAutomaticTagConflictChoices, AutomaticChoice.class)); … … 230 232 231 233 /** The Tag key to match */ 232 @ prefpublic String key;234 @StructEntry public String key; 233 235 234 236 /** A free description */ 235 @ prefpublic String description = "";237 @StructEntry public String description = ""; 236 238 237 239 /** If regular expression must be used to match the Tag key or the value. */ 238 @ prefpublic boolean isRegex;240 @StructEntry public boolean isRegex; 239 241 240 242 /** The separator to use to combine the values. */ 241 @ prefpublic String separator = ";";243 @StructEntry public String separator = ";"; 242 244 243 245 /** If the combined values must be sorted. … … 249 251 * </ul> 250 252 */ 251 @ prefpublic String sort;253 @StructEntry public String sort; 252 254 253 255 /** Default constructor. */ … … 317 319 318 320 /** The Tag key to match. */ 319 @ prefpublic String key;321 @StructEntry public String key; 320 322 321 323 /** The name of the {link AutomaticChoice group} this choice belongs to. */ 322 @ prefpublic String group;324 @StructEntry public String group; 323 325 324 326 /** A free description. */ 325 @ prefpublic String description = "";327 @StructEntry public String description = ""; 326 328 327 329 /** If regular expression must be used to match the Tag key or the value. */ 328 @ prefpublic boolean isRegex;330 @StructEntry public boolean isRegex; 329 331 330 332 /** The Tag value to match. */ 331 @ prefpublic String value;333 @StructEntry public String value; 332 334 333 335 /** … … 335 337 * Natural String ordering is used to identify the best score. 336 338 */ 337 @ prefpublic String score;339 @StructEntry public String score; 338 340 339 341 /** Default constructor. */ … … 404 406 405 407 /** The Tag key to match. */ 406 @ prefpublic String key;408 @StructEntry public String key; 407 409 408 410 /** The name of the group. */ … … 410 412 411 413 /** If regular expression must be used to match the Tag key. */ 412 @ prefpublic boolean isRegex;414 @StructEntry public boolean isRegex; 413 415 414 416 /** The list of choice to choose from. */ -
trunk/src/org/openstreetmap/josm/gui/io/importexport/WMSLayerExporter.java
r12671 r12851 7 7 import java.io.ObjectOutputStream; 8 8 9 import org.openstreetmap.josm.data. Preferences;9 import org.openstreetmap.josm.data.StructUtils; 10 10 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryPreferenceEntry; 11 11 import org.openstreetmap.josm.gui.MainApplication; … … 42 42 oos.writeObject(MainApplication.getMap().mapView.getCenter()); 43 43 ImageryPreferenceEntry entry = new ImageryPreferenceEntry(((AbstractTileSourceLayer) layer).getInfo()); 44 oos.writeObject( Preferences.serializeStruct(entry, ImageryPreferenceEntry.class));44 oos.writeObject(StructUtils.serializeStruct(entry, ImageryPreferenceEntry.class)); 45 45 } 46 46 } -
trunk/src/org/openstreetmap/josm/gui/io/importexport/WMSLayerImporter.java
r12671 r12851 12 12 13 13 import org.openstreetmap.josm.actions.ExtensionFileFilter; 14 import org.openstreetmap.josm.data. Preferences;14 import org.openstreetmap.josm.data.StructUtils; 15 15 import org.openstreetmap.josm.data.coor.EastNorth; 16 16 import org.openstreetmap.josm.data.imagery.ImageryInfo; … … 72 72 73 73 @SuppressWarnings("unchecked") 74 ImageryPreferenceEntry entry = Preferences.deserializeStruct(74 ImageryPreferenceEntry entry = StructUtils.deserializeStruct( 75 75 (Map<String, String>) ois.readObject(), 76 76 ImageryPreferenceEntry.class);
Note: See TracChangeset
for help on using the changeset viewer.