Changeset 18928 in osm for applications/editors/josm/plugins/validator
- Timestamp:
- 2009-12-03T21:02:38+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/build.xml
r18600 r18928 26 26 ** update before publishing 27 27 --> 28 <property name="commit.message" value="Updated build.xml" />29 <property name="plugin.main.version" value="2 452" />28 <property name="commit.message" value="Updated to new referrer support in OsmPrimitive" /> 29 <property name="plugin.main.version" value="2565" /> 30 30 31 31 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java
r18593 r18928 11 11 12 12 import org.openstreetmap.josm.command.Command; 13 import org.openstreetmap.josm.data.osm.BackreferencedDataSet;14 13 import org.openstreetmap.josm.data.osm.Node; 15 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 61 60 /** the progress monitor to use */ 62 61 protected ProgressMonitor progressMonitor; 63 64 /**65 * the data structure with child->parent references66 */67 protected BackreferencedDataSet backreferenceDataSet;68 69 62 /** 70 63 * Constructor … … 100 93 */ 101 94 public void startTest(ProgressMonitor progressMonitor) { 102 backreferenceDataSet = new BackreferencedDataSet();103 95 if (progressMonitor == null) { 104 96 this.progressMonitor = NullProgressMonitor.INSTANCE; … … 135 127 progressMonitor.finishTask(); 136 128 progressMonitor = null; 137 backreferenceDataSet = null;138 129 } 139 130 -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java
r18737 r18928 144 144 Set<DefaultMutableTreeNode> processedNodes = new HashSet<DefaultMutableTreeNode>(); 145 145 146 DuplicateNode.clearBackreferences();147 146 LinkedList<TestError> errorsToFix = new LinkedList<TestError>(); 148 147 for (TreePath path : selectionPaths) { -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java
r18593 r18928 16 16 import org.openstreetmap.josm.command.Command; 17 17 import org.openstreetmap.josm.data.coor.LatLon; 18 import org.openstreetmap.josm.data.osm.BackreferencedDataSet;19 18 import org.openstreetmap.josm.data.osm.Node; 20 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 31 30 */ 32 31 public 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 }46 32 47 33 protected static int DUPLICATE_NODE = 1; … … 112 98 Node target = MergeNodesAction.selectTargetNode(nodes); 113 99 if(checkAndConfirmOutlyingDeletes(nodes)) 114 return MergeNodesAction.mergeNodes(Main.main.getEditLayer(), getBackreferenceDataSet(),nodes, target);100 return MergeNodesAction.mergeNodes(Main.main.getEditLayer(), nodes, target); 115 101 116 102 return null;// undoRedo handling done in mergeNodes -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnclosedWays.java
r18789 r18928 104 104 105 105 if (type != null && !w.isClosed()) { 106 for (OsmPrimitive parent: this.backreferenceDataSet.getParents(w)) {106 for (OsmPrimitive parent: w.getReferrers()) { 107 107 if (parent instanceof Relation && "multipolygon".equals(parent.get("type"))) 108 108 return;
Note:
See TracChangeset
for help on using the changeset viewer.