Ignore:
Timestamp:
2009-12-03T21:02:38+01:00 (15 years ago)
Author:
guggis
Message:

'Updated to new referrer support in OsmPrimitive'

Location:
applications/editors/josm/plugins/validator
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/build.xml

    r18600 r18928  
    2626          ** update before publishing
    2727        -->
    28         <property name="commit.message" value="Updated build.xml" />           
    29         <property name="plugin.main.version" value="2452" />
     28        <property name="commit.message" value="Updated to new referrer support in OsmPrimitive" />             
     29        <property name="plugin.main.version" value="2565" />
    3030               
    3131               
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java

    r18593 r18928  
    1111
    1212import org.openstreetmap.josm.command.Command;
    13 import org.openstreetmap.josm.data.osm.BackreferencedDataSet;
    1413import org.openstreetmap.josm.data.osm.Node;
    1514import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    6160    /** the progress monitor to use */
    6261    protected ProgressMonitor progressMonitor;
    63 
    64     /**
    65      * the data structure with child->parent references
    66      */
    67     protected BackreferencedDataSet backreferenceDataSet;
    68 
    6962    /**
    7063     * Constructor
     
    10093     */
    10194    public void startTest(ProgressMonitor progressMonitor) {
    102         backreferenceDataSet = new BackreferencedDataSet();
    10395        if (progressMonitor == null) {
    10496                this.progressMonitor = NullProgressMonitor.INSTANCE;
     
    135127        progressMonitor.finishTask();
    136128        progressMonitor = null;
    137         backreferenceDataSet = null;
    138129    }
    139130
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java

    r18737 r18928  
    144144        Set<DefaultMutableTreeNode> processedNodes = new HashSet<DefaultMutableTreeNode>();
    145145
    146         DuplicateNode.clearBackreferences();
    147146        LinkedList<TestError> errorsToFix = new LinkedList<TestError>();
    148147        for (TreePath path : selectionPaths) {
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java

    r18593 r18928  
    1616import org.openstreetmap.josm.command.Command;
    1717import org.openstreetmap.josm.data.coor.LatLon;
    18 import org.openstreetmap.josm.data.osm.BackreferencedDataSet;
    1918import org.openstreetmap.josm.data.osm.Node;
    2019import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    3130 */
    3231public class DuplicateNode extends Test{
    33 
    34         private static BackreferencedDataSet backreferences;
    35 
    36         public static BackreferencedDataSet getBackreferenceDataSet() {
    37                 if (backreferences == null) {
    38                         backreferences = new BackreferencedDataSet();
    39                 }
    40                 return backreferences;
    41         }
    42 
    43         public static void clearBackreferences() {
    44                 backreferences = null;
    45         }
    4632
    4733    protected static int DUPLICATE_NODE = 1;
     
    11298        Node target = MergeNodesAction.selectTargetNode(nodes);
    11399        if(checkAndConfirmOutlyingDeletes(nodes))
    114             return MergeNodesAction.mergeNodes(Main.main.getEditLayer(),getBackreferenceDataSet(), nodes, target);
     100            return MergeNodesAction.mergeNodes(Main.main.getEditLayer(), nodes, target);
    115101
    116102        return null;// undoRedo handling done in mergeNodes
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java

    r18789 r18928  
    104104
    105105        if (type != null && !w.isClosed()) {
    106             for (OsmPrimitive parent: this.backreferenceDataSet.getParents(w)) {
     106            for (OsmPrimitive parent: w.getReferrers()) {
    107107                if (parent instanceof Relation && "multipolygon".equals(parent.get("type")))
    108108                    return;
Note: See TracChangeset for help on using the changeset viewer.