diff --git a/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java b/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
index 1bd2c8a..5707381 100644
|
a
|
b
|
public class TagChecker extends Test
|
| 148 | 148 | * Constructor |
| 149 | 149 | */ |
| 150 | 150 | public TagChecker() { |
| 151 | | super(tr("Properties checker :"), |
| | 151 | super(tr("Properties checker:"), |
| 152 | 152 | tr("This plugin checks for errors in property keys and values.")); |
| 153 | 153 | } |
| 154 | 154 | |
| … |
… |
public class TagChecker extends Test
|
| 213 | 213 | BufferedReader reader = new BufferedReader(r); |
| 214 | 214 | |
| 215 | 215 | String okValue = null; |
| 216 | | boolean tagcheckerfile = false; |
| 217 | | boolean ignorefile = false; |
| | 216 | boolean tagcheckerFile = false; |
| | 217 | boolean ignoreFile = false; |
| 218 | 218 | String line; |
| 219 | | while ((line = reader.readLine()) != null && (tagcheckerfile || line.length() != 0)) { |
| | 219 | while ((line = reader.readLine()) != null && (tagcheckerFile || line.length() != 0)) { |
| | 220 | System.out.println(line + tagcheckerFile + ignoreFile); |
| 220 | 221 | if (line.startsWith("#")) { |
| 221 | 222 | if (line.startsWith("# JOSM TagChecker")) { |
| 222 | | tagcheckerfile = true; |
| 223 | | } |
| 224 | | if (line.startsWith("# JOSM IgnoreTags")) { |
| 225 | | ignorefile = true; |
| | 223 | tagcheckerFile = true; |
| | 224 | ignoreFile = false; |
| | 225 | } else if (line.startsWith("# JOSM IgnoreTags")) { |
| | 226 | ignoreFile = true; |
| | 227 | tagcheckerFile = false; |
| | 228 | } else if (!tagcheckerFile && !ignoreFile) { |
| | 229 | System.err.println(tr("Missing/invalid header line (either ''{0}'' or ''{1}'') in line {2}", "# JOSM TagChecker", "# JOSM IgnoreTags", line)); |
| 226 | 230 | } |
| 227 | 231 | continue; |
| 228 | | } else if (ignorefile) { |
| | 232 | } else if (ignoreFile) { |
| 229 | 233 | line = line.trim(); |
| 230 | 234 | if (line.length() < 4) { |
| 231 | 235 | continue; |
| … |
… |
public class TagChecker extends Test
|
| 248 | 252 | ignoreDataKeyPair.add(tmp); |
| 249 | 253 | } |
| 250 | 254 | continue; |
| 251 | | } else if (tagcheckerfile) { |
| | 255 | } else if (tagcheckerFile) { |
| 252 | 256 | if (line.length() > 0) { |
| 253 | 257 | CheckerData d = new CheckerData(); |
| 254 | 258 | String err = d.getData(line); |
| … |
… |
public class TagChecker extends Test
|
| 263 | 267 | okValue = line.substring(1); |
| 264 | 268 | } else if (line.charAt(0) == '-' && okValue != null) { |
| 265 | 269 | spellCheckKeyData.put(line.substring(1), okValue); |
| | 270 | } else if (!tagcheckerFile && !ignoreFile) { |
| | 271 | System.err.println(tr("Missing/invalid header line (either ''{0}'' or ''{1}'') in line {2}", "# JOSM TagChecker", "# JOSM IgnoreTags", line)); |
| 266 | 272 | } else { |
| 267 | 273 | System.err.println(tr("Invalid spellcheck line: {0}", line)); |
| 268 | 274 | } |