Changeset 27159 in osm for applications/editors/josm/plugins
- Timestamp:
- 2011-11-26T15:34:06+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/reverter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reverter/build.xml
r27091 r27159 30 30 <project name="reverter" default="dist" basedir="."> 31 31 <!-- enter the SVN commit message --> 32 <property name="commit.message" value="reverter : add support for remotecontrol for curl-scripted reverts"/>32 <property name="commit.message" value="Update reverter for 4602"/> 33 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="4 549"/>34 <property name="plugin.main.version" value="4602"/> 35 35 <!-- 36 36 ************************************************ -
applications/editors/josm/plugins/reverter/src/reverter/corehacks/OsmChangesetContentParser.java
r23273 r27159 16 16 import org.openstreetmap.josm.data.coor.LatLon; 17 17 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 18 import org.openstreetmap.josm.data.osm.User; 18 19 import org.openstreetmap.josm.data.osm.history.HistoryNode; 19 20 import org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive; … … 148 149 long changesetId = getMandatoryAttributeLong(atts,"changeset"); 149 150 boolean visible= getMandatoryAttributeBoolean(atts, "visible"); 150 long uid = getAttributeLong(atts, "uid",-1);151 String user = getAttributeString(atts, "user", tr("<anonymous>"));152 151 String v = getMandatoryAttributeString(atts, "timestamp"); 153 152 Date timestamp = DateUtils.fromString(v); 154 153 HistoryOsmPrimitive primitive = null; 154 // Hack: reverter doesn't need user information, so always use User.getAnonymous() 155 // TODO: Update OsmChangesetContentParser from the core or update core OsmChangesetContentParser to make it usable with reverter 155 156 if (type.equals(OsmPrimitiveType.NODE)) { 156 157 double lat = getMandatoryAttributeDouble(atts, "lat"); 157 158 double lon = getMandatoryAttributeDouble(atts, "lon"); 158 159 primitive = new HistoryNode( 159 id,version,visible, user,uid,changesetId,timestamp, new LatLon(lat,lon)160 id,version,visible,User.getAnonymous(),changesetId,timestamp, new LatLon(lat,lon) 160 161 ); 161 162 162 163 } else if (type.equals(OsmPrimitiveType.WAY)) { 163 164 primitive = new HistoryWay( 164 id,version,visible, user,uid,changesetId,timestamp165 id,version,visible,User.getAnonymous(),changesetId,timestamp 165 166 ); 166 167 }if (type.equals(OsmPrimitiveType.RELATION)) { 167 168 primitive = new HistoryRelation( 168 id,version,visible, user,uid,changesetId,timestamp169 id,version,visible,User.getAnonymous(),changesetId,timestamp 169 170 ); 170 171 }
Note:
See TracChangeset
for help on using the changeset viewer.