- Timestamp:
- 2014-12-24T02:41:51+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r7796 r7879 117 117 return false; 118 118 return true; 119 } 120 121 @Override 122 public String toString() { 123 return "GroupedMapCSSRule [selectors=" + selectors + ", declaration=" + declaration + "]"; 119 124 } 120 125 } … … 525 530 return result; 526 531 } 532 533 @Override 534 public String toString() { 535 return "MapCSSTagCheckerAndRule [rule=" + rule + "]"; 536 } 527 537 } 528 538 … … 534 544 */ 535 545 public synchronized Collection<TestError> getErrorsForPrimitive(OsmPrimitive p, boolean includeOtherSeverity) { 546 return getErrorsForPrimitive(p, includeOtherSeverity, checks.values()); 547 } 548 549 private static Collection<TestError> getErrorsForPrimitive(OsmPrimitive p, boolean includeOtherSeverity, 550 Collection<Set<TagCheck>> checksCol) { 536 551 final List<TestError> r = new ArrayList<>(); 537 552 final Environment env = new Environment(p, new MultiCascade(), Environment.DEFAULT_LAYER, null); 538 for (Set<TagCheck> schecks : checks .values()) {553 for (Set<TagCheck> schecks : checksCol) { 539 554 for (TagCheck check : schecks) { 540 555 if (Severity.OTHER.equals(check.getSeverity()) && !includeOtherSeverity) { … … 641 656 // Add primitive to dataset to avoid DataIntegrityProblemException when evaluating selectors 642 657 ds.addPrimitive(p); 643 final boolean isError = Utils.exists(getErrorsForPrimitive(p, true), new Predicate<TestError>() { 658 final Collection<TestError> pErrors = getErrorsForPrimitive(p, true, 659 Collections.singleton(Collections.singleton(check))); 660 if (Main.isDebugEnabled()) { 661 Main.debug("- Errors: "+pErrors); 662 } 663 final boolean isError = Utils.exists(pErrors, new Predicate<TestError>() { 644 664 @Override 645 665 public boolean evaluate(TestError e) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSRule.java
r7140 r7879 67 67 return true; 68 68 } 69 70 @Override 71 public String toString() { 72 return "Declaration [instructions=" + instructions + ", idx=" + idx + "]"; 73 } 69 74 } 70 75 76 /** 77 * Constructs a new {@code MapCSSRule}. 78 * @param selector The selector 79 * @param declaration The declaration 80 */ 71 81 public MapCSSRule(Selector selector, Declaration declaration) { 72 82 this.selector = selector;
Note:
See TracChangeset
for help on using the changeset viewer.