Changeset 13954 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-06-18T19:56:34+02:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
r13926 r13954 14 14 import org.openstreetmap.josm.Main; 15 15 import org.openstreetmap.josm.data.notes.Note; 16 import org.openstreetmap.josm.data.osm.AbstractPrimitive; 17 import org.openstreetmap.josm.data.osm.DataSet; 16 import org.openstreetmap.josm.data.osm.IPrimitive; 18 17 import org.openstreetmap.josm.data.osm.OsmData; 19 18 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 101 100 102 101 protected void launchInfoBrowsersForSelectedPrimitivesAndNote() { 103 List< OsmPrimitive> primitivesToShow = new ArrayList<>();104 DataSet ds = getLayerManager().getActiveDataSet();102 List<IPrimitive> primitivesToShow = new ArrayList<>(); 103 OsmData<?, ?, ?, ?> ds = getLayerManager().getActiveData(); 105 104 if (ds != null) { 106 105 primitivesToShow.addAll(ds.getAllSelected()); … … 111 110 // filter out new primitives which are not yet uploaded to the server 112 111 // 113 primitivesToShow.removeIf( AbstractPrimitive::isNew);112 primitivesToShow.removeIf(IPrimitive::isNew); 114 113 115 114 if (primitivesToShow.isEmpty() && noteToShow == null) { -
trunk/src/org/openstreetmap/josm/actions/HistoryInfoWebAction.java
r10378 r13954 8 8 9 9 import org.openstreetmap.josm.Main; 10 import org.openstreetmap.josm.data.osm. OsmPrimitive;10 import org.openstreetmap.josm.data.osm.IPrimitive; 11 11 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 12 12 import org.openstreetmap.josm.tools.Shortcut; … … 32 32 @Override 33 33 protected String createInfoUrl(Object infoObject) { 34 if (infoObject instanceof OsmPrimitive) {35 OsmPrimitive primitive = (OsmPrimitive) infoObject;36 return Main.getBaseBrowseUrl() + '/' + OsmPrimitiveType.from(primitive).getAPIName() + '/' + primitive.get Id() + "/history";34 if (infoObject instanceof IPrimitive) { 35 IPrimitive primitive = (IPrimitive) infoObject; 36 return Main.getBaseBrowseUrl() + '/' + OsmPrimitiveType.from(primitive).getAPIName() + '/' + primitive.getOsmId() + "/history"; 37 37 } else { 38 38 return null; -
trunk/src/org/openstreetmap/josm/actions/InfoWebAction.java
r12630 r13954 10 10 import org.openstreetmap.josm.Main; 11 11 import org.openstreetmap.josm.data.notes.Note; 12 import org.openstreetmap.josm.data.osm.IPrimitive; 12 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 13 14 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; … … 35 36 @Override 36 37 protected String createInfoUrl(Object infoObject) { 37 if (infoObject instanceof OsmPrimitive) {38 OsmPrimitive primitive = (OsmPrimitive) infoObject;39 return Main.getBaseBrowseUrl() + '/' + OsmPrimitiveType.from(primitive).getAPIName() + '/' + primitive.get Id();38 if (infoObject instanceof IPrimitive) { 39 IPrimitive primitive = (IPrimitive) infoObject; 40 return Main.getBaseBrowseUrl() + '/' + OsmPrimitiveType.from(primitive).getAPIName() + '/' + primitive.getOsmId(); 40 41 } else if (infoObject instanceof Note) { 41 42 Note note = (Note) infoObject;
Note:
See TracChangeset
for help on using the changeset viewer.