Changeset 9891 in osm for applications/editors/josm/plugins
- Timestamp:
- 2008-08-16T00:59:39+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedNode.java
r9684 r9891 13 13 import org.openstreetmap.josm.plugins.validator.Severity; 14 14 import org.openstreetmap.josm.plugins.validator.Test; 15 import org.openstreetmap.josm.plugins.validator.util.Util;16 15 import org.openstreetmap.josm.plugins.validator.TestError; 17 16 … … 70 69 public void visit(Node n) 71 70 { 72 if(!n.incomplete && !n.deleted && Util.countDataTags(n) == 0)71 if(!n.incomplete && !n.deleted && !n.tagged) 73 72 emptyNodes.add(n); 74 73 } -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UntaggedWay.java
r9684 r9891 13 13 import org.openstreetmap.josm.plugins.validator.Test; 14 14 import org.openstreetmap.josm.plugins.validator.TestError; 15 import org.openstreetmap.josm.plugins.validator.util.Util;16 15 17 16 /** … … 80 79 } 81 80 82 if( Util.countDataTags(w) == 0)81 if(!w.tagged) 83 82 { 84 83 errors.add( new TestError(this, Severity.WARNING, tr("Untagged ways"), UNTAGGED_WAY, w) ); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/Util.java
r9684 r9891 28 28 public class Util 29 29 { 30 /** Tags without informational contents */31 private static final String[] noDataTags = new String[] { "created_by", "converted_by", "source" };32 public static int countDataTags(OsmPrimitive osm)33 {34 int numTags = 0;35 Map<String, String> tags = osm.keys;36 if(tags != null)37 {38 numTags = tags.size();39 for(String tag : noDataTags)40 if(tags.containsKey(tag))41 --numTags;42 }43 return numTags;44 }45 46 30 /** 47 31 * Returns the plugin's directory of the plugin
Note:
See TracChangeset
for help on using the changeset viewer.