Ignore:
Timestamp:
2017-09-14T01:59:34+02:00 (2 years ago)
Author:
bastiK
Message:

see #15229 - extract "struct" handling from Preference to StructUtils

Location:
trunk/src/org/openstreetmap/josm/io/session
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/session/ImagerySessionExporter.java

    r12604 r12851  
    1313import javax.swing.SwingConstants;
    1414
    15 import org.openstreetmap.josm.data.Preferences;
     15import org.openstreetmap.josm.data.StructUtils;
    1616import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryPreferenceEntry;
    1717import org.openstreetmap.josm.data.imagery.OffsetBookmark;
     
    8484        layerElem.setAttribute("version", "0.1");
    8585        ImageryPreferenceEntry e = new ImageryPreferenceEntry(layer.getInfo());
    86         Map<String, String> data = new LinkedHashMap<>(Preferences.serializeStruct(e, ImageryPreferenceEntry.class));
     86        Map<String, String> data = new LinkedHashMap<>(StructUtils.serializeStruct(e, ImageryPreferenceEntry.class));
    8787        Utils.instanceOfThen(layer, AbstractTileSourceLayer.class, tsLayer -> {
    8888            data.putAll(tsLayer.getDisplaySettings().toPropertiesMap());
  • trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java

    r12620 r12851  
    88import java.util.Map;
    99
    10 import org.openstreetmap.josm.data.Preferences;
     10import org.openstreetmap.josm.data.StructUtils;
    1111import org.openstreetmap.josm.data.imagery.ImageryInfo;
    1212import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryPreferenceEntry;
     
    4242        Map<String, String> attributes = readProperties(elem);
    4343
    44         ImageryPreferenceEntry prefEntry = Preferences.deserializeStruct(attributes, ImageryPreferenceEntry.class);
     44        ImageryPreferenceEntry prefEntry = StructUtils.deserializeStruct(attributes, ImageryPreferenceEntry.class);
    4545        ImageryInfo info = new ImageryInfo(prefEntry);
    4646        ImageryLayer layer = ImageryLayer.create(info);
Note: See TracChangeset for help on using the changeset viewer.