Class FilteringOutlinePopup.StringMatcher
java.lang.Object
org.eclipse.handly.ui.quickoutline.FilteringOutlinePopup.StringMatcher
- Enclosing class:
- FilteringOutlinePopup
protected static class FilteringOutlinePopup.StringMatcher
extends Object
implements Predicate<String>
A string pattern matcher that supports '*' and '?' wildcards.
-
Constructor Summary
ConstructorDescriptionStringMatcher
(String pattern, boolean ignoreCase) Creates a new string matcher based on the given pattern. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
protected String
translatePattern
(String pattern) Translates the given pattern into a regular expression.
-
Constructor Details
-
StringMatcher
Creates a new string matcher based on the given pattern. The pattern may contain '*' for zero or more characters and '?' for exactly one character.- Parameters:
pattern
- the pattern string (notnull
)ignoreCase
- whether case-insensitive matching is enabled
-
-
Method Details
-
test
-
translatePattern
Translates the given pattern into a regular expression.This implementation always returns a regular expression that starts with '^'.
- Parameters:
pattern
- the pattern string (notnull
)- Returns:
- the regular expression corresponding to the pattern
(never
null
)
-