/** * Executes the command on the dataset. This implementation will remember all primitives returned * by fillModifiedData for restoring them on undo. */ public boolean executeCommand() { CloneVisitor visitor = new CloneVisitor(); Collection<OsmPrimitive> all = new ArrayList<OsmPrimitive>(); fillModifiedData(all, all, all); for (OsmPrimitive osm : all) { osm.visit(visitor); } cloneMap = visitor.orig; return true; }