- Timestamp:
- 2018-06-10T20:41:41+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r13434 r13905 28 28 import org.openstreetmap.josm.data.osm.OsmPrimitive; 29 29 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 30 import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor; 30 31 import org.openstreetmap.josm.data.validation.TestError; 31 32 import org.openstreetmap.josm.gui.MainApplication; … … 308 309 } 309 310 for (OsmPrimitive osm : sel) { 310 osm.accept( v);311 osm.accept((PrimitiveVisitor) v); 311 312 } 312 313 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java
r12846 r13905 10 10 import org.openstreetmap.josm.data.coor.ILatLon; 11 11 import org.openstreetmap.josm.data.coor.LatLon; 12 import org.openstreetmap.josm.data.osm.INode; 13 import org.openstreetmap.josm.data.osm.IRelation; 14 import org.openstreetmap.josm.data.osm.IRelationMember; 15 import org.openstreetmap.josm.data.osm.IWay; 12 16 import org.openstreetmap.josm.data.osm.Node; 13 17 import org.openstreetmap.josm.data.osm.OsmPrimitive; 14 18 import org.openstreetmap.josm.data.osm.Relation; 15 import org.openstreetmap.josm.data.osm.RelationMember;16 19 import org.openstreetmap.josm.data.osm.Way; 17 20 import org.openstreetmap.josm.gui.MainApplication; … … 24 27 * @author imi 25 28 */ 26 public class BoundingXYVisitor implements OsmPrimitiveVisitor {29 public class BoundingXYVisitor implements OsmPrimitiveVisitor, PrimitiveVisitor { 27 30 28 31 private ProjectionBounds bounds; … … 35 38 @Override 36 39 public void visit(Way w) { 40 visit((IWay<?>) w); 41 } 42 43 @Override 44 public void visit(Relation r) { 45 visit((IRelation<?>) r); 46 } 47 48 @Override 49 public void visit(INode n) { 50 visit((ILatLon) n); 51 } 52 53 @Override 54 public void visit(IWay<?> w) { 37 55 if (w.isIncomplete()) return; 38 for ( Node n : w.getNodes()) {56 for (INode n : w.getNodes()) { 39 57 visit(n); 40 58 } … … 42 60 43 61 @Override 44 public void visit( Relation e) {62 public void visit(IRelation<?> r) { 45 63 // only use direct members 46 for ( RelationMember m : e.getMembers()) {64 for (IRelationMember<?> m : r.getMembers()) { 47 65 if (!m.isRelation()) { 48 66 m.getMember().accept(this); … … 226 244 continue; 227 245 } 228 p.accept( this);246 p.accept((PrimitiveVisitor) this); 229 247 } 230 248 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
r13761 r13905 40 40 import org.openstreetmap.josm.data.osm.WaySegment; 41 41 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 42 import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor; 42 43 import org.openstreetmap.josm.data.preferences.sources.ValidatorPrefHelper; 43 44 import org.openstreetmap.josm.data.validation.OsmValidator; … … 543 544 public void visit(OsmPrimitive p) { 544 545 if (p.isUsable()) { 545 p.accept( this);546 p.accept((PrimitiveVisitor) this); 546 547 } 547 548 }
Note:
See TracChangeset
for help on using the changeset viewer.