Changeset 6927 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2014-03-24T00:48:17+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
r6908 r6927 341 341 } 342 342 343 public String child_tag(String key) { 344 return env.child == null ? null : env.child.get(key); 345 } 346 343 347 /** 344 348 * Determines whether the object has a tag with the given key. -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSParser.jj
r6897 r6927 368 368 ( 369 369 ( 370 ( <GREATER> { type = Selector.ChildOrParentSelectorType.CHILD; } | <LESS> { type = Selector.ChildOrParentSelectorType.PARENT; } ) 370 ( 371 <GREATER> { type = Selector.ChildOrParentSelectorType.CHILD; } 372 | 373 <LESS> { type = Selector.ChildOrParentSelectorType.PARENT; } 374 | 375 <PLUS> { type = Selector.ChildOrParentSelectorType.SIBLING; } 376 ) 371 377 ( ( c=condition(Context.LINK) | c=class_or_pseudoclass(Context.LINK) ) { conditions.add(c); } )* 372 378 | -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r6897 r6927 39 39 40 40 public static enum ChildOrParentSelectorType { 41 CHILD, PARENT, ELEMENT_OF, CROSSING 41 CHILD, PARENT, ELEMENT_OF, CROSSING, SIBLING 42 42 } 43 43 … … 258 258 } 259 259 return e.child != null; 260 } else if (ChildOrParentSelectorType.SIBLING.equals(type)) { 261 if (e.osm instanceof Node) { 262 for (Way w : Utils.filteredCollection(e.osm.getReferrers(), Way.class)) { 263 final int i = w.getNodes().indexOf(e.osm); 264 if (i - 1 >= 0) { 265 final Node n = w.getNode(i - 1); 266 final Environment e2 = e.withPrimitive(n).withParent(w).withChild(e.osm); 267 if (left.matches(e2)) { 268 if (link.matches(e2.withLinkContext())) { 269 e.child = n; 270 e.index = i; 271 e.parent = w; 272 return true; 273 } 274 } 275 } 276 } 277 } 260 278 } else if (ChildOrParentSelectorType.CHILD.equals(type)) { 261 279 MatchingReferrerFinder collector = new MatchingReferrerFinder(e); -
trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreference.java
r6897 r6927 137 137 List<ExtendedSourceEntry> def = new ArrayList<ExtendedSourceEntry>(); 138 138 139 addDefault(def, "addresses", tr("Addresses"), tr("Checks for errors on addresses")); 139 140 addDefault(def, "combinations", tr("Tag combinations"), tr("Checks for missing tag or suspicious combinations")); 140 141 addDefault(def, "deprecated", tr("Deprecated features"), tr("Checks for deprecated features"));
Note:
See TracChangeset
for help on using the changeset viewer.