protected abstract class FilteredItemsSelectionDialog.ItemsFilter extends Object
| Modifier and Type | Field and Description |
|---|---|
protected SearchPattern |
patternMatcher |
| Constructor and Description |
|---|
FilteredItemsSelectionDialog.ItemsFilter()
Creates new instance of ItemsFilter.
|
FilteredItemsSelectionDialog.ItemsFilter(SearchPattern searchPattern)
Creates new instance of ItemsFilter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalsFilter(FilteredItemsSelectionDialog.ItemsFilter filter)
Checks whether the provided filter is equal to the current filter.
|
int |
getMatchRule()
Returns the rule to apply for matching keys.
|
String |
getPattern()
Returns the pattern string.
|
boolean |
isCamelCasePattern()
Checks whether the pattern's match rule is camel case.
|
abstract boolean |
isConsistentItem(Object item)
Checks consistency of an item.
|
boolean |
isSubFilter(FilteredItemsSelectionDialog.ItemsFilter filter)
Check if the given filter is a sub-filter of this filter.
|
protected boolean |
matches(String text)
Matches text with filter.
|
boolean |
matchesRawNamePattern(Object item)
General method for matching raw name pattern.
|
abstract boolean |
matchItem(Object item)
Matches an item against filter conditions.
|
protected SearchPattern patternMatcher
public FilteredItemsSelectionDialog.ItemsFilter()
public FilteredItemsSelectionDialog.ItemsFilter(SearchPattern searchPattern)
searchPattern - the pattern to be used when filteringpublic boolean isSubFilter(FilteredItemsSelectionDialog.ItemsFilter filter)
SearchPattern from the
given filter is a sub-pattern of the one from this filter.
WARNING: This method is not defined in reading order, i.e.
a.isSubFilter(b) is true iff
b is a sub-filter of a, and not
vice-versa.
filter - the filter to be checked, or nulltrue if the given filter is sub-filter of this
filter, false if the given filter isn't a
sub-filter or is nullSearchPattern.isSubPattern(org.eclipse.ui.dialogs.SearchPattern)public boolean equalsFilter(FilteredItemsSelectionDialog.ItemsFilter filter)
SearchPattern
from current filter is equal to the one from provided filter.filter - filter to be checked, or nulltrue if the given filter is equal to current
filter, false if given filter isn't equal to
current one or if it is nullSearchPattern.equalsPattern(org.eclipse.ui.dialogs.SearchPattern)public boolean isCamelCasePattern()
true if pattern's match rule is camel case,
false otherwisepublic String getPattern()
SearchPattern.getPattern()public int getMatchRule()
for match rules returned by the
default implementationprotected boolean matches(String text)
text - the text to match with the filtertrue if text matches with filter pattern,
false otherwisepublic boolean matchesRawNamePattern(Object item)
item - item to checktrue if current pattern is a prefix of name
provided item, false if item's name is shorter
than prefix or sequences of characters don't match.public abstract boolean matchItem(Object item)
item - true if item matches against filter conditions, false
otherwisepublic abstract boolean isConsistentItem(Object item)
item - true if item is consistent, false
if item is inconsistent
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.