Changeset 15985 in josm
- Timestamp:
- 2020-03-01T23:36:00+01:00 (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/TagInfoExtract.java
r15984 r15985 58 58 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule; 59 59 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource; 60 import org.openstreetmap.josm.gui.mappaint.mapcss.Selector;61 60 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser; 62 61 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException; … … 343 342 private List<TagInfoTag> convertStyleSheet() { 344 343 return styleSource.rules.stream() 345 .map(rule -> rule.selector) 346 .filter(Selector.GeneralSelector.class::isInstance) 347 .map(Selector.GeneralSelector.class::cast) 348 .map(Selector.AbstractSelector::getConditions) 349 .flatMap(Collection::stream) 344 .flatMap(rule -> rule.selector.getConditions().stream()) 350 345 .filter(ConditionFactory.SimpleKeyValueCondition.class::isInstance) 351 346 .map(ConditionFactory.SimpleKeyValueCondition.class::cast) -
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
r15959 r15985 37 37 import org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.OpenEndPseudoClassCondition; 38 38 import org.openstreetmap.josm.tools.CheckParameterUtil; 39 import org.openstreetmap.josm.tools.CompositeList; 39 40 import org.openstreetmap.josm.tools.Geometry; 40 41 import org.openstreetmap.josm.tools.Geometry.PolygonIntersection; … … 124 125 */ 125 126 Selector optimizedBaseCheck(); 127 128 /** 129 * Returns the list of conditions. 130 * @return the list of conditions 131 */ 132 List<Condition> getConditions(); 126 133 127 134 /** … … 170 177 this.right = b; 171 178 this.type = type; 179 } 180 181 @Override 182 public List<Condition> getConditions() { 183 return new CompositeList<>(left.getConditions(), right.getConditions()); 172 184 } 173 185 … … 643 655 } 644 656 645 /** 646 * Returns the list of conditions. 647 * @return the list of conditions 648 */ 657 @Override 649 658 public List<Condition> getConditions() { 650 659 return conds;
Note:
See TracChangeset
for help on using the changeset viewer.