Class SelectorMatcher
java.lang.Object
org.eclipse.e4.ui.css.core.impl.engine.selector.SelectorMatcher
Matches a
Selectors.Selector against an Element.
Every method is static; the matcher carries no state. Callers pass the
element being tested plus an optional pseudo-element string (the same
argument the SAC engine carried) so that pseudo-class matching can defer
to the existing CSSStylableElement.isPseudoInstanceOf(String) contract.
Tag-name comparison is case sensitive, matching the existing SAC matcher
(Phase 1 test testTagNameCaseSensitivity in CSSEngineTest
locks this in). Pseudo-class semantics also follow the existing engine:
the static-pseudo-instance carve-out from
CSSPseudoClassConditionImpl is preserved so cascade behaviour
does not shift.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanmatches(Selectors.Selector selector, Element element, String pseudoElement) static booleanmatches(Selectors.Selector selector, Element element, String pseudoElement, Element[] hierarchy, int hierarchyIndex)
-
Method Details
-
matches
- Returns:
trueifselectormatcheselementfor the given pseudo state.
-
matches
public static boolean matches(Selectors.Selector selector, Element element, String pseudoElement, Element[] hierarchy, int hierarchyIndex) - Returns:
trueifselectormatcheselementfor the given pseudo state, using a pre-computed ancestor hierarchy array if available.
-