Ignore:
Timestamp:
2021-05-17T21:12:13+02:00 (4 years ago)
Author:
taylor.smock
Message:

trustosm: recompile for compatibility with JOSM r17896

Location:
applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/data/TrustWay.java

    r32533 r35762  
    88
    99import org.bouncycastle.openpgp.PGPSignature;
     10import org.openstreetmap.josm.data.osm.IWaySegment;
    1011import org.openstreetmap.josm.data.osm.Node;
    1112import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1213import org.openstreetmap.josm.data.osm.Way;
    13 import org.openstreetmap.josm.data.osm.WaySegment;
     14import org.openstreetmap.josm.tools.Logging;
    1415
    1516public class TrustWay extends TrustOsmPrimitive {
     
    5455            osm = osmItem;
    5556        } else {
    56             System.err.println("Error while creating TrustWay: OsmPrimitive "+osmItem.getUniqueId()+" is not a Way!");
     57            Logging.error("Error while creating TrustWay: OsmPrimitive "+osmItem.getUniqueId()+" is not a Way!");
    5758        }
    5859    }
     
    7475    }
    7576
    76     public TrustSignatures getSigsOnSegment(WaySegment seg) {
     77    public TrustSignatures getSigsOnSegment(IWaySegment<Node, ?> seg) {
    7778        List<Node> nodes = new ArrayList<>();
    7879        nodes.add(seg.getFirstNode());
  • applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/gui/dialogs/TrustDialog.java

    r34571 r35762  
    4343import org.openstreetmap.josm.data.osm.DataSelectionListener;
    4444import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
     45import org.openstreetmap.josm.data.osm.IWaySegment;
    4546import org.openstreetmap.josm.data.osm.Node;
    4647import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    8889    private Collection<? extends OsmPrimitive> osmData;
    8990
    90     private final List<WaySegment> selectedSegments = new ArrayList<>();
     91    private final List<IWaySegment<Node, Way>> selectedSegments = new ArrayList<>();
    9192    private final List<OsmPrimitive> selectedPrimitives = new ArrayList<>();
    9293
     
    233234                            seg.getSecondNode().getDisplayName(DefaultNameFormatter.getInstance()));
    234235                    TrustSignatures sigs;
    235                     String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg.way);
     236                    String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg.getWay());
    236237                    if (TrustOSMplugin.signedItems.containsKey(id)
    237238                            && (sigs = ((TrustWay) TrustOSMplugin.signedItems.get(id)).getSigsOnSegment(seg)) != null) {
     
    401402                        nodes.add(seg.getFirstNode());
    402403                        nodes.add(seg.getSecondNode());
    403                         Way w = seg.way;
     404                        Way w = seg.getWay();
    404405                        String id = TrustOsmPrimitive.createUniqueObjectIdentifier(w);
    405406                        TrustWay trust = TrustOSMplugin.signedItems.containsKey(id) ?
     
    449450                    } else if (o instanceof WaySegment) {
    450451                        WaySegment seg = (WaySegment) o;
    451                         String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg.way);
     452                        String id = TrustOsmPrimitive.createUniqueObjectIdentifier(seg.getWay());
    452453                        if (TrustOSMplugin.signedItems.containsKey(id)) {
    453454                            List<Node> nodes = new ArrayList<>();
     
    654655
    655656        // highlight all selected WaySegments
    656         for (WaySegment seg : selectedSegments) {
     657        for (IWaySegment<?, ?> seg : selectedSegments) {
    657658            GeneralPath b = new GeneralPath();
    658659            Point p1 = mv.getPoint(seg.getFirstNode());
Note: See TracChangeset for help on using the changeset viewer.