### Eclipse Workspace Patch 1.0
#P JOSM
|
|
|
|
| 457 | 457 | withErrors.put(p, "HTML"); |
| 458 | 458 | } |
| 459 | 459 | if (checkValues && value != null && value.length() > 0 && presetsValueData != null) { |
| | 460 | final Set<String> values = presetsValueData.get(key); |
| | 461 | final boolean keyInPresets = values != null; |
| | 462 | final boolean tagInPresets = values != null && (values.isEmpty() || values.contains(prop.getValue())); |
| | 463 | |
| 460 | 464 | boolean ignore = false; |
| 461 | 465 | for (String a : ignoreDataStartsWith) { |
| 462 | 466 | if (key.startsWith(a)) { |
| … |
… |
|
| 473 | 477 | ignore = true; |
| 474 | 478 | } |
| 475 | 479 | } |
| 476 | | if (!ignore) { |
| 477 | | String i = marktr("Key ''{0}'' not in presets."); |
| 478 | | errors.add( new TestError(this, Severity.OTHER, tr("Presets do not contain property key"), |
| 479 | | tr(i, key), MessageFormat.format(i, key), INVALID_VALUE, p) ); |
| 480 | | withErrors.put(p, "UPK"); |
| 481 | | } else { |
| 482 | | Set<String> values = presetsValueData.get(key); |
| 483 | | if (values != null && values.size() > 0 && !values.contains(prop.getValue())) { |
| 484 | | ignore = false; |
| 485 | | for (IgnoreKeyPair a : ignoreDataKeyPair) { |
| 486 | | if (key.equals(a.key) && value.equals(a.value)) { |
| 487 | | ignore = true; |
| 488 | | } |
| | 480 | |
| | 481 | if (!tagInPresets) { |
| | 482 | for (IgnoreKeyPair a : ignoreDataKeyPair) { |
| | 483 | if (key.equals(a.key) && value.equals(a.value)) { |
| | 484 | ignore = true; |
| 489 | 485 | } |
| | 486 | } |
| 490 | 487 | |
| 491 | | for (IgnoreTwoKeyPair a : ignoreDataTwoKeyPair) { |
| 492 | | if (key.equals(a.key2) && value.equals(a.value2)) { |
| 493 | | ignore = true; |
| 494 | | } |
| | 488 | for (IgnoreTwoKeyPair a : ignoreDataTwoKeyPair) { |
| | 489 | if (key.equals(a.key2) && value.equals(a.value2)) { |
| | 490 | ignore = true; |
| 495 | 491 | } |
| 496 | | |
| 497 | | if (!ignore) { |
| 498 | | String i = marktr("Value ''{0}'' for key ''{1}'' not in presets."); |
| 499 | | errors.add( new TestError(this, Severity.OTHER, tr("Presets do not contain property value"), |
| 500 | | tr(i, prop.getValue(), key), MessageFormat.format(i, prop.getValue(), key), INVALID_VALUE, p) ); |
| 501 | | withErrors.put(p, "UPV"); |
| 502 | | } |
| 503 | 492 | } |
| 504 | 493 | } |
| | 494 | |
| | 495 | if (!ignore) { |
| | 496 | if (!keyInPresets) { |
| | 497 | String i = marktr("Key ''{0}'' not in presets."); |
| | 498 | errors.add( new TestError(this, Severity.OTHER, tr("Presets do not contain property key"), |
| | 499 | tr(i, key), MessageFormat.format(i, key), INVALID_VALUE, p) ); |
| | 500 | withErrors.put(p, "UPK"); |
| | 501 | } else if (!tagInPresets) { |
| | 502 | String i = marktr("Value ''{0}'' for key ''{1}'' not in presets."); |
| | 503 | errors.add( new TestError(this, Severity.OTHER, tr("Presets do not contain property value"), |
| | 504 | tr(i, prop.getValue(), key), MessageFormat.format(i, prop.getValue(), key), INVALID_VALUE, p) ); |
| | 505 | withErrors.put(p, "UPV"); |
| | 506 | } |
| | 507 | } |
| 505 | 508 | } |
| 506 | 509 | if (checkFixmes && value != null && value.length() > 0) { |
| 507 | 510 | if ((value.toLowerCase().contains("fixme") |