Changeset 27395 in osm for applications/editors/josm/plugins/undelete
- Timestamp:
- 2012-01-02T15:50:50+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/undelete
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/undelete/build.xml
r27243 r27395 32 32 <property name="commit.message" value="adapt to core changes (backwards compatible)"/> 33 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="4 602"/>34 <property name="plugin.main.version" value="4734"/> 35 35 <!-- 36 36 ************************************************ … … 145 145 </target> 146 146 <!-- 147 ************************** Publishing the plugin *********************************** 148 --> 149 <!-- 150 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 147 ************************** Publishing the plugin *********************************** 148 --> 149 <!-- 150 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 151 151 ** property ${coreversion.info.entry.revision} 152 152 ** … … 194 194 </target> 195 195 <!-- 196 ** commits the plugin.jar 196 ** commits the plugin.jar 197 197 --> 198 198 <target name="commit-dist"> 199 199 <echo> 200 200 ***** Properties of published ${plugin.jar} ***** 201 Commit message : '${commit.message}' 201 Commit message : '${commit.message}' 202 202 Plugin-Mainversion: ${plugin.main.version} 203 203 JOSM build version: ${coreversion.info.entry.revision} 204 204 Plugin-Version : ${version.entry.commit.revision} 205 ***** / Properties of published ${plugin.jar} ***** 206 205 ***** / Properties of published ${plugin.jar} ***** 206 207 207 Now commiting ${plugin.jar} ... 208 208 </echo> -
applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java
r27243 r27395 27 27 import org.openstreetmap.josm.data.osm.Relation; 28 28 import org.openstreetmap.josm.data.osm.RelationMember; 29 import org.openstreetmap.josm.data.osm.RelationMemberData; 29 30 import org.openstreetmap.josm.data.osm.SimplePrimitiveId; 30 31 import org.openstreetmap.josm.data.osm.User; … … 70 71 } 71 72 72 public void actionPerformed(ActionEvent e) { 73 @Override 74 public void actionPerformed(ActionEvent e) { 73 75 JCheckBox layer = new JCheckBox(tr("Separate Layer")); 74 76 layer.setToolTipText(tr("Select if the data should be added into a new layer")); … … 120 122 Main.pref.put("undelete.osmid", Long.toString(tfId.getOsmId())); 121 123 List<Long> ids=new ArrayList<Long>(); 122 ids.add( (long)tfId.getOsmId());124 ids.add(tfId.getOsmId()); 123 125 undelete(layer.isSelected(), cbType.getType(), ids, 0); 124 126 } … … 149 151 150 152 Runnable r = new Runnable() { 151 public void run() { 153 @Override 154 public void run() { 152 155 List<Node> nodes=new ArrayList<Node>(); 153 156 for (long id: ids) … … 225 228 226 229 List<RelationMember> members = new ArrayList<RelationMember>(hRel.getNumMembers()); 227 for ( org.openstreetmap.josm.data.osm.history.RelationMemberm : hRel.getMembers()) {228 OsmPrimitive p = datas.getPrimitiveById(m.get PrimitiveId(), m.getPrimitiveType());230 for (RelationMemberData m : hRel.getMembers()) { 231 OsmPrimitive p = datas.getPrimitiveById(m.getMemberId(), m.getMemberType()); 229 232 if (p == null) { 230 switch (m.get PrimitiveType()) {231 case NODE: p = new Node(m.get PrimitiveId()); break;232 case WAY: p = new Way(m.get PrimitiveId()); break;233 case RELATION: p = new Relation(m.get PrimitiveId()); break;233 switch (m.getMemberType()) { 234 case NODE: p = new Node(m.getMemberId()); break; 235 case WAY: p = new Way(m.getMemberId()); break; 236 case RELATION: p = new Relation(m.getMemberId()); break; 234 237 } 235 238 datas.addPrimitive(p);
Note:
See TracChangeset
for help on using the changeset viewer.