Changeset 30000 in osm for applications
- Timestamp:
- 2013-10-06T19:08:22+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/reverter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reverter/.classpath
r21225 r30000 2 2 <classpath> 3 3 <classpathentry kind="src" path="src"/> 4 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER "/>4 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> 5 5 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 6 6 <classpathentry kind="output" path="build"/> -
applications/editors/josm/plugins/reverter/src/reverter/ChangesetReverter.java
r29561 r30000 9 9 import java.util.HashSet; 10 10 import java.util.Iterator; 11 import java.util.LinkedList;12 11 import java.util.List; 13 12 … … 204 203 * @throws OsmTransferException 205 204 */ 205 @SuppressWarnings("unchecked") 206 206 public void downloadObjectsHistory(ProgressMonitor progressMonitor) throws OsmTransferException { 207 207 final OsmServerMultiObjectReader rdr = new OsmServerMultiObjectReader(); … … 334 334 // Create commands to restore/update all affected objects 335 335 DataSetCommandMerger merger = new DataSetCommandMerger(nds,ds); 336 Li nkedList<Command> cmds = merger.getCommandList();336 List<Command> cmds = merger.getCommandList(); 337 337 338 338 ////////////////////////////////////////////////////////////////////////// -
applications/editors/josm/plugins/reverter/src/reverter/DataSetCommandMerger.java
r29627 r30000 31 31 private final DataSet targetDataSet; 32 32 33 private final LinkedList<Command> cmds = new LinkedList<Command>(); 33 private final List<Command> cmds = new LinkedList<Command>(); 34 private final List<OsmPrimitive> undeletedPrimitives = new LinkedList<OsmPrimitive>(); 34 35 35 36 /** … … 45 46 if (!target.hasEqualSemanticAttributes(newTarget)) { 46 47 cmds.add(new ChangeCommand(target,newTarget)); 48 undeletedPrimitives.add(target); 47 49 } 48 50 } … … 94 96 for (Node sourceNode : source.getNodes()) { 95 97 Node targetNode = (Node)getMergeTarget(sourceNode); 96 if (!targetNode.isDeleted() ) {98 if (!targetNode.isDeleted() || undeletedPrimitives.contains(targetNode)) { 97 99 newNodes.add(targetNode); 98 100 } else if (sourceNode.isIncomplete() … … 157 159 } 158 160 159 public Li nkedList<Command> getCommandList() {161 public List<Command> getCommandList() { 160 162 return cmds; 161 163 }
Note:
See TracChangeset
for help on using the changeset viewer.