Changeset 6638 in josm
- Timestamp:
- 2014-01-05T20:09:34+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r6593 r6638 135 135 protected static final Entities entities = new Entities(); 136 136 137 static final List<String> DEFAULT_SOURCES = Arrays.asList(DATA_FILE, IGNORE_FILE, SPELL_FILE); 138 137 139 /** 138 140 * Constructor … … 167 169 168 170 String errorSources = ""; 169 for (String source : Main.pref.getCollection(PREF_SOURCES, Arrays.asList(DATA_FILE, IGNORE_FILE, SPELL_FILE))) {171 for (String source : Main.pref.getCollection(PREF_SOURCES, DEFAULT_SOURCES)) { 170 172 BufferedReader reader = null; 171 173 try { … … 176 178 boolean tagcheckerfile = false; 177 179 boolean ignorefile = false; 180 boolean isFirstLine = true; 178 181 String line; 179 182 while ((line = reader.readLine()) != null && (tagcheckerfile || line.length() != 0)) { … … 181 184 if (line.startsWith("# JOSM TagChecker")) { 182 185 tagcheckerfile = true; 183 } 186 if (!DEFAULT_SOURCES.contains(source)) { 187 Main.info(tr("Adding {0} to tag checker", source)); 188 } 189 } else 184 190 if (line.startsWith("# JOSM IgnoreTags")) { 185 191 ignorefile = true; 192 if (!DEFAULT_SOURCES.contains(source)) { 193 Main.info(tr("Adding {0} to ignore tags", source)); 194 } 186 195 } 187 continue;188 196 } else if (ignorefile) { 189 197 line = line.trim(); … … 208 216 ignoreDataKeyPair.add(tmp); 209 217 } 210 continue;211 218 } else if (tagcheckerfile) { 212 219 if (line.length() > 0) { … … 226 233 } else { 227 234 Main.error(tr("Invalid spellcheck line: {0}", line)); 235 } 236 if (isFirstLine) { 237 isFirstLine = false; 238 if (!(tagcheckerfile || ignorefile) && !DEFAULT_SOURCES.contains(source)) { 239 Main.info(tr("Adding {0} to spellchecker", source)); 240 } 228 241 } 229 242 }
Note:
See TracChangeset
for help on using the changeset viewer.