Changeset 6887 in josm for trunk/src/org


Ignore:
Timestamp:
2014-02-26T23:45:59+01:00 (11 years ago)
Author:
Don-vip
Message:

package refactoring of conflict commands => move all of them to new package command.conflict (some plugins have to be updated)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 added
6 edited
9 moved

Legend:

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

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
     
    1010
    1111import org.openstreetmap.josm.Main;
     12import org.openstreetmap.josm.command.Command;
    1213import org.openstreetmap.josm.data.conflict.Conflict;
    1314import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    1617import org.openstreetmap.josm.tools.ImageProvider;
    1718
     19/**
     20 * Command used to add a new conflict.
     21 * @since 1857
     22 */
    1823public class ConflictAddCommand extends Command {
    1924    private Conflict<? extends OsmPrimitive> conflict;
    2025
     26    /**
     27     * Constructs a new {@code ConflictAddCommand}.
     28     * @param layer the data layer. Must not be null.
     29     * @param conflict the conflict to add
     30     */
    2131    public ConflictAddCommand(OsmDataLayer layer, Conflict<? extends OsmPrimitive> conflict) {
    2232        super(layer);
     
    3747        );
    3848    }
    39     @Override public boolean executeCommand() {
     49
     50    @Override
     51    public boolean executeCommand() {
    4052        try {
    4153            getLayer().getConflicts().add(conflict);
     
    4759    }
    4860
    49     @Override public void undoCommand() {
     61    @Override
     62    public void undoCommand() {
    5063        if (! Main.map.mapView.hasLayer(getLayer())) {
    5164            Main.warn(tr("Layer ''{0}'' does not exist any more. Cannot remove conflict for object ''{1}''.",
     
    5871    }
    5972
    60     @Override public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
     73    @Override
     74    public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added) {
    6175        // nothing to fill
    6276    }
  • trunk/src/org/openstreetmap/josm/command/conflict/ConflictResolveCommand.java

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
    55
    66import org.openstreetmap.josm.Main;
     7import org.openstreetmap.josm.command.Command;
    78import org.openstreetmap.josm.data.conflict.Conflict;
    89import org.openstreetmap.josm.data.conflict.ConflictCollection;
  • trunk/src/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommand.java

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
  • trunk/src/org/openstreetmap/josm/command/conflict/DeletedStateConflictResolveCommand.java

    r6886 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
  • trunk/src/org/openstreetmap/josm/command/conflict/ModifiedConflictResolveCommand.java

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.marktr;
  • trunk/src/org/openstreetmap/josm/command/conflict/RelationMemberConflictResolverCommand.java

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
  • trunk/src/org/openstreetmap/josm/command/conflict/TagConflictResolveCommand.java

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.trn;
  • trunk/src/org/openstreetmap/josm/command/conflict/VersionConflictResolveCommand.java

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.marktr;
  • trunk/src/org/openstreetmap/josm/command/conflict/WayNodesConflictResolverCommand.java

    r6884 r6887  
    11// License: GPL. For details, see LICENSE file.
    2 package org.openstreetmap.josm.command;
     2package org.openstreetmap.josm.command.conflict;
    33
    44import static org.openstreetmap.josm.tools.I18n.tr;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java

    r6883 r6887  
    1616
    1717import org.openstreetmap.josm.command.Command;
    18 import org.openstreetmap.josm.command.ModifiedConflictResolveCommand;
    1918import org.openstreetmap.josm.command.SequenceCommand;
    20 import org.openstreetmap.josm.command.VersionConflictResolveCommand;
     19import org.openstreetmap.josm.command.conflict.ModifiedConflictResolveCommand;
     20import org.openstreetmap.josm.command.conflict.VersionConflictResolveCommand;
    2121import org.openstreetmap.josm.data.conflict.Conflict;
    2222import org.openstreetmap.josm.data.osm.Node;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java

    r5903 r6887  
    99import javax.swing.table.DefaultTableModel;
    1010
    11 import org.openstreetmap.josm.command.WayNodesConflictResolverCommand;
     11import org.openstreetmap.josm.command.conflict.WayNodesConflictResolverCommand;
    1212import org.openstreetmap.josm.data.conflict.Conflict;
    1313import org.openstreetmap.josm.data.osm.Node;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java

    r6883 r6887  
    1212
    1313import org.openstreetmap.josm.command.Command;
    14 import org.openstreetmap.josm.command.CoordinateConflictResolveCommand;
    15 import org.openstreetmap.josm.command.DeletedStateConflictResolveCommand;
     14import org.openstreetmap.josm.command.conflict.CoordinateConflictResolveCommand;
     15import org.openstreetmap.josm.command.conflict.DeletedStateConflictResolveCommand;
    1616import org.openstreetmap.josm.data.conflict.Conflict;
    1717import org.openstreetmap.josm.data.coor.LatLon;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java

    r5301 r6887  
    99import javax.swing.table.DefaultTableModel;
    1010
    11 import org.openstreetmap.josm.command.RelationMemberConflictResolverCommand;
     11import org.openstreetmap.josm.command.conflict.RelationMemberConflictResolverCommand;
    1212import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1313import org.openstreetmap.josm.data.osm.PrimitiveId;
  • trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeModel.java

    r6883 r6887  
    1111import javax.swing.table.DefaultTableModel;
    1212
    13 import org.openstreetmap.josm.command.TagConflictResolveCommand;
     13import org.openstreetmap.josm.command.conflict.TagConflictResolveCommand;
    1414import org.openstreetmap.josm.data.conflict.Conflict;
    1515import org.openstreetmap.josm.data.osm.OsmPrimitive;
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java

    r6798 r6887  
    6060import org.openstreetmap.josm.command.ChangeCommand;
    6161import org.openstreetmap.josm.command.Command;
    62 import org.openstreetmap.josm.command.ConflictAddCommand;
     62import org.openstreetmap.josm.command.conflict.ConflictAddCommand;
    6363import org.openstreetmap.josm.data.conflict.Conflict;
    6464import org.openstreetmap.josm.data.osm.DataSet;
Note: See TracChangeset for help on using the changeset viewer.