Changeset 14283 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2018-09-30T14:56:36+02:00 (6 years ago)
Author:
Don-vip
Message:

see #12726 - add new getters in {Change,Sequence}Command

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

Legend:

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

    r13173 r14283  
    9090    }
    9191
     92    /**
     93     * Returns the original OSM primitive to modify. It belongs to a dataset.
     94     * @return the original OSM primitive to modify
     95     * @since 14283
     96     */
     97    public final OsmPrimitive getOsmPrimitive() {
     98        return osm;
     99    }
     100
     101    /**
     102     * Returns the new OSM primitive.
     103     * @return the new OSM primitive
     104     * @since 14283
     105     */
     106    public final OsmPrimitive getNewOsmPrimitive() {
     107        return newOsm;
     108    }
     109
    92110    @Override
    93111    public int hashCode() {
  • trunk/src/org/openstreetmap/josm/command/SequenceCommand.java

    r13206 r14283  
    103103    }
    104104
    105     @Override public void undoCommand() {
    106         // We probably aborted this halfway though the
    107         // execution sequence because of a sub-command
    108         // error.  We already undid the sub-commands.
     105    @Override
     106    public void undoCommand() {
     107        // We probably aborted this halfway though the execution sequence because of a sub-command error.
     108        // We already undid the sub-commands.
    109109        if (!sequenceComplete)
    110110            return;
     
    112112    }
    113113
    114     @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
     114    @Override
     115    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
    115116        for (Command c : sequence) {
    116117            c.fillModifiedData(modified, deleted, added);
     
    121122    public String getDescriptionText() {
    122123        return tr("Sequence: {0}", name);
     124    }
     125
     126    /**
     127     * Returns the command name used in description text.
     128     * @return the command name
     129     * @since 14283
     130     */
     131    public final String getName() {
     132        return name;
    123133    }
    124134
Note: See TracChangeset for help on using the changeset viewer.