Changeset 1862 in josm for trunk/src/org/openstreetmap/josm/command
- Timestamp:
- 2009-07-27T21:09:44+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/PurgePrimitivesCommand.java
r1814 r1862 21 21 import org.openstreetmap.josm.data.osm.RelationMember; 22 22 import org.openstreetmap.josm.data.osm.Way; 23 import org.openstreetmap.josm.gui.layer.OsmDataLayer;24 23 import org.openstreetmap.josm.tools.ImageProvider; 25 24 … … 28 27 * layer and disconnects any references from {@see Way}s or {@see Relation}s 29 28 * to this primitive. 30 * 29 * 31 30 * This command is necessary if a local {@see OsmPrimitive} has been deleted on 32 31 * the server by another user and if the local user decides to delete his version 33 32 * too. If he only deleted it "logically" JOSM would try to delete it on the server 34 33 * which would result in an non resolvable conflict. 35 * 34 * 36 35 */ 37 36 public class PurgePrimitivesCommand extends ConflictResolveCommand{ … … 44 43 * because a {@see Relation} refers to any other {@see OsmPrimitive} 45 44 * via a relation member. 46 * 45 * 47 46 */ 48 47 static class OsmParentChildPair { … … 100 99 * as child and given set of parents. We don't use {@see CollectBackReferencesVisitor} 101 100 * because it seems quite inefficient. 102 * 101 * 103 102 * @param parents the set of potential parents 104 103 * @param child the child … … 110 109 if (parent instanceof Way) { 111 110 Way w = (Way)parent; 112 for (OsmPrimitive node : w. nodes) {111 for (OsmPrimitive node : w.getNodes()) { 113 112 if (node == child) { 114 113 OsmParentChildPair pair = new OsmParentChildPair(parent, node); … … 170 169 /** 171 170 * Purges an {@see OsmPrimitive} <code>toPurge</code> from a {@see DataSet}. 172 * 171 * 173 172 * @param toPurge the primitive to purge 174 173 * @param ds the dataset to purge from 175 174 * @param hive the hive of {@see OsmPrimitive}s we remember other {@see OsmPrimitive} 176 175 * we have to purge because we purge <code>toPurge</code>. 177 * 176 * 178 177 */ 179 178 protected void purge(OsmPrimitive toPurge, DataSet ds, ArrayList<OsmPrimitive> hive) {
Note:
See TracChangeset
for help on using the changeset viewer.