Class RuleIndex

java.lang.Object
org.eclipse.e4.ui.css.core.impl.engine.selector.RuleIndex

public final class RuleIndex extends Object
Buckets style rules by the rightmost simple selector of each selector alternative, so the cascade only runs the matcher against rules that can possibly match a given element.
  • Method Details

    • of

      public static RuleIndex of(List<CSSStyleSheetImpl> styleSheets)
      Indexes every style rule of the given stylesheets in cascade order.
    • candidatesFor

      public List<RuleIndex.Candidate> candidatesFor(Element element)
      The candidates whose bucket key the element satisfies, in cascade order. A superset of the actually matching alternatives; callers still run the matcher on each candidate.
    • allCandidates

      public List<RuleIndex.Candidate> allCandidates()
      Every indexed candidate, in cascade order.