Class FilteringOutlinePopup.ElementMatcher
- java.lang.Object
-
- org.eclipse.handly.ui.quickoutline.FilteringOutlinePopup.ElementMatcher
-
- All Implemented Interfaces:
java.util.function.Predicate<java.lang.Object>
- Enclosing class:
- FilteringOutlinePopup
protected class FilteringOutlinePopup.ElementMatcher extends java.lang.Object implements java.util.function.Predicate<java.lang.Object>
A pattern-based element matcher for the outline popup. Passes thetext
(by default, the label string) obtained for the given outline element to the underlying string matcher.
-
-
Constructor Summary
Constructors Constructor Description ElementMatcher(java.util.function.Predicate<java.lang.String> stringMatcher)
Creates a new element matcher based on the given string matcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getText(java.lang.Object element)
Returns the text for the given outline element.boolean
test(java.lang.Object element)
-
-
-
Method Detail
-
test
public final boolean test(java.lang.Object element)
- Specified by:
test
in interfacejava.util.function.Predicate<java.lang.Object>
-
getText
protected java.lang.String getText(java.lang.Object element)
Returns the text for the given outline element.Default implementation returns the label string obtained from the tree viewer's label provider.
- Parameters:
element
- the outline element (nevernull
)- Returns:
- the text for the given outline element,
or
null
if no text can be obtained
-
-