Ignore:
Timestamp:
2007-10-07T13:20:27+02:00 (12 years ago)
Author:
gebner
Message:

Merge 0.5.

Location:
trunk/src/org/openstreetmap/josm/command
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/command/AddCommand.java

    r304 r343  
    1212import org.openstreetmap.josm.Main;
    1313import org.openstreetmap.josm.data.osm.DataSet;
     14import org.openstreetmap.josm.data.osm.Relation;
    1415import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1516import org.openstreetmap.josm.data.osm.visitor.AddVisitor;
     
    2223 * A command that adds an osm primitive to a dataset. Keys cannot be added this
    2324 * way. Use ChangeKeyValueCommand instead.
     25 *
     26 * See ChangeCommand for comments on relation back references.
    2427 *
    2528 * @author imi
  • trunk/src/org/openstreetmap/josm/command/ChangeCommand.java

    r298 r343  
    1313import org.openstreetmap.josm.data.osm.visitor.NameVisitor;
    1414
     15/**
     16 * Command that basically replaces one OSM primitive by another of the
     17 * same type.
     18 * 
     19 * @author Imi
     20 */
    1521public class ChangeCommand extends Command {
    1622
  • trunk/src/org/openstreetmap/josm/command/Command.java

    r304 r343  
    1010import javax.swing.tree.MutableTreeNode;
    1111
     12import org.openstreetmap.josm.data.osm.Relation;
    1213import org.openstreetmap.josm.data.osm.Node;
    1314import org.openstreetmap.josm.data.osm.OsmPrimitive;
    14 import org.openstreetmap.josm.data.osm.Segment;
    1515import org.openstreetmap.josm.data.osm.Way;
    1616import org.openstreetmap.josm.data.osm.visitor.Visitor;
     
    3737                        orig.put(n, new Node(n));
    3838                }
    39                 public void visit(Segment s) {
    40                         orig.put(s, new Segment(s));
    41                 }
    4239                public void visit(Way w) {
    4340                        orig.put(w, new Way(w));
     41                }
     42                public void visit(Relation e) {
     43                        orig.put(e, new Relation(e));
    4444                }
    4545        }
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r298 r343  
    1111import javax.swing.tree.MutableTreeNode;
    1212
     13import org.openstreetmap.josm.data.osm.Relation;
    1314import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1415import org.openstreetmap.josm.data.osm.visitor.NameVisitor;
     
    3233        @Override public void executeCommand() {
    3334                super.executeCommand();
    34                 for (OsmPrimitive osm : data)
     35                for (OsmPrimitive osm : data) {
    3536                        osm.delete(true);
     37                }
    3638        }
    37 
     39       
    3840        @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
    3941                deleted.addAll(data);
Note: See TracChangeset for help on using the changeset viewer.