- Timestamp:
- 2013-12-27T17:14:34+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r6538 r6548 255 255 cmds.add(new ChangePropertyKeyCommand(p, oldKey, newKey)); 256 256 } 257 return new SequenceCommand(tr("Fix of {0}", getDescription ()), cmds);257 return new SequenceCommand(tr("Fix of {0}", getDescriptionForMatchingSelector(matchingSelector)), cmds); 258 258 } 259 259 … … 271 271 * 272 272 * @return a description (possibly with alternative suggestions) 273 * @see {@link #getDescriptionForMatchingSelector(Selector)} 273 274 */ 274 275 String getDescription() { … … 281 282 } 282 283 284 /** 285 * Constructs a (localized) description for this deprecation check 286 * where any placeholders are replaced by values of the matched selector. 287 * 288 * @return a description (possibly with alternative suggestions) 289 */ 290 String getDescriptionForMatchingSelector(Selector matchingSelector) { 291 return insertArguments(matchingSelector, getDescription()); 292 } 293 283 294 Severity getSeverity() { 284 295 return errors.values().iterator().next(); 296 } 297 298 @Override 299 public String toString() { 300 return getDescription(); 285 301 } 286 302 … … 295 311 if (matchingSelector != null) { 296 312 final Command fix = fixPrimitive(p); 297 final String description = TagCheck.insertArguments(matchingSelector, getDescription());313 final String description = getDescriptionForMatchingSelector(matchingSelector); 298 314 if (fix != null) { 299 315 return new FixableTestError(null, getSeverity(), description, 3000, p, fix); … … 363 379 addMapCSS("religion.mapcss"); 364 380 addMapCSS("relation.mapcss"); 381 addMapCSS("combinations.mapcss"); 382 addMapCSS("unnecessary.mapcss"); 383 addMapCSS("wikipedia.mapcss"); 384 addMapCSS("power.mapcss"); 365 385 } 366 386 }
Note:
See TracChangeset
for help on using the changeset viewer.