protected abstract class CdmFilteredItemsSelectionDialog.ItemsFilter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.ui.dialogs.SearchPattern |
patternMatcher |
Constructor and Description |
---|
ItemsFilter()
Creates new instance of ItemsFilter.
|
ItemsFilter(org.eclipse.ui.dialogs.SearchPattern searchPattern)
Creates new instance of ItemsFilter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equalsFilter(CdmFilteredItemsSelectionDialog.ItemsFilter filter)
Checks whether the provided filter is equal to the current filter.
|
int |
getMatchRule()
Returns the rule to apply for matching keys.
|
java.lang.String |
getPattern()
Returns the pattern string.
|
boolean |
isCamelCasePattern()
Checks whether the pattern's match rule is camel case.
|
abstract boolean |
isConsistentItem(java.lang.Object item)
Checks consistency of an item.
|
boolean |
isSubFilter(CdmFilteredItemsSelectionDialog.ItemsFilter filter)
Check if the given filter is a sub-filter of this filter.
|
protected boolean |
matches(java.lang.String text)
Matches text with filter.
|
boolean |
matchesRawNamePattern(java.lang.Object item)
General method for matching raw name pattern.
|
abstract boolean |
matchItem(java.lang.Object item)
Matches an item against filter conditions.
|
public ItemsFilter()
public ItemsFilter(org.eclipse.ui.dialogs.SearchPattern searchPattern)
searchPattern
- the pattern to be used when filteringpublic boolean isSubFilter(CdmFilteredItemsSelectionDialog.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 null
true
if the given filter is sub-filter of this
filter, false
if the given filter isn't a
sub-filter or is null
SearchPattern.isSubPattern(org.eclipse.ui.dialogs.SearchPattern)
public boolean equalsFilter(CdmFilteredItemsSelectionDialog.ItemsFilter filter)
SearchPattern
from current filter is equal to the one from provided filter.filter
- filter to be checked, or null
true
if the given filter is equal to current
filter, false
if given filter isn't equal to
current one or if it is null
SearchPattern.equalsPattern(org.eclipse.ui.dialogs.SearchPattern)
public boolean isCamelCasePattern()
true
if pattern's match rule is camel case,
false
otherwisepublic java.lang.String getPattern()
SearchPattern.getPattern()
public int getMatchRule()
for match rules returned by the
default implementation
protected boolean matches(java.lang.String text)
text
- the text to match with the filtertrue
if text matches with filter pattern,
false
otherwisepublic boolean matchesRawNamePattern(java.lang.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(java.lang.Object item)
item
- true if item matches against filter conditions, false
otherwise
public abstract boolean isConsistentItem(java.lang.Object item)
item
- true
if item is consistent, false
if item is inconsistentCopyright © 2007-2018. All Rights Reserved.