Ignore:
Timestamp:
2007-05-08T16:11:53+02:00 (17 years ago)
Author:
frsantos
Message:

Adapted to changes in ReorderAction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnorderedWay.java

    r2591 r2838  
    33import static org.openstreetmap.josm.tools.I18n.tr;
    44
    5 import java.util.*;
    6 
    75import org.openstreetmap.josm.actions.ReorderAction;
    8 import org.openstreetmap.josm.command.*;
    9 import org.openstreetmap.josm.data.osm.OsmPrimitive;
    10 import org.openstreetmap.josm.data.osm.Segment;
    11 import org.openstreetmap.josm.data.osm.Way;
    12 import org.openstreetmap.josm.plugins.validator.Severity;
    13 import org.openstreetmap.josm.plugins.validator.Test;
    14 import org.openstreetmap.josm.plugins.validator.TestError;
     6import org.openstreetmap.josm.command.Command;
     7import org.openstreetmap.josm.data.osm.*;
     8import org.openstreetmap.josm.plugins.validator.*;
    159
    1610/**
     
    4842        public Command fixError(TestError testError)
    4943        {
    50                 List<Command> commands = new ArrayList<Command>(50);
    51                
    5244                for(OsmPrimitive p : testError.getPrimitives() )
    5345                {
    54                         Way w = (Way)p;
    55                         Way newWay = new Way(w);
    56                         newWay.segments.clear();
    57                         newWay.segments.addAll(ReorderAction.sortSegments(new HashSet<Segment>(w.segments)));
    58                         return new ChangeCommand(p, newWay);
     46            return ReorderAction.reorderWay((Way)p);
    5947                }
    6048               
    61                 return commands.size() > 1 ? new SequenceCommand("Remove keys", commands) : commands.get(0);
     49                return null;
    6250        }
    6351       
Note: See TracChangeset for help on using the changeset viewer.