Package org.eclipse.ui.dialogs
Class FilteredResourcesSelectionDialog.ResourceFilter
java.lang.Object
org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter
org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog.ResourceFilter
- Enclosing class:
- FilteredResourcesSelectionDialog
protected class FilteredResourcesSelectionDialog.ResourceFilter
extends FilteredItemsSelectionDialog.ItemsFilter
Filters resources using pattern and showDerived flag. It overrides
ItemsFilter.
-
Field Summary
Fields inherited from class org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter
patternMatcher
-
Constructor Summary
ConstructorDescriptionCreates new ResourceFilter instanceResourceFilter
(IContainer container, boolean showDerived, int typeMask) Creates new ResourceFilter instance -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the provided filter is equal to the current filter.boolean
isConsistentItem
(Object item) Checks consistency of an item.boolean
Check show derived flag for a filterboolean
Check if the given filter is a sub-filter of this filter.boolean
Matches an item against filter conditions.Methods inherited from class org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter
getMatchRule, getPattern, isCamelCasePattern, matches, matchesRawNamePattern
-
Constructor Details
-
ResourceFilter
Creates new ResourceFilter instance- Parameters:
container
- filtered containershowDerived
- flag which determine showing derived elementstypeMask
- filter type mask. SeeIResource.getType()
types.
-
ResourceFilter
public ResourceFilter()Creates new ResourceFilter instance
-
-
Method Details
-
isConsistentItem
Description copied from class:FilteredItemsSelectionDialog.ItemsFilter
Checks consistency of an item. Item is inconsistent if was changed or removed.- Specified by:
isConsistentItem
in classFilteredItemsSelectionDialog.ItemsFilter
- Parameters:
item
- Must be instance of IResource, otherwisefalse
will be returned.- Returns:
true
if item is consistent,false
if item is inconsistent- See Also:
-
matchItem
Description copied from class:FilteredItemsSelectionDialog.ItemsFilter
Matches an item against filter conditions.- Specified by:
matchItem
in classFilteredItemsSelectionDialog.ItemsFilter
- Parameters:
item
- Must be instance of IResource, otherwisefalse
will be returned.- Returns:
true
if item matches against filter conditions,false
otherwise- See Also:
-
isSubFilter
Description copied from class:FilteredItemsSelectionDialog.ItemsFilter
Check if the given filter is a sub-filter of this filter. The default implementation checks if theSearchPattern
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)
istrue
iffb
is a sub-filter ofa
, and not vice-versa.- Overrides:
isSubFilter
in classFilteredItemsSelectionDialog.ItemsFilter
- Parameters:
filter
- the filter to be checked, ornull
- Returns:
true
if the given filter is sub-filter of this filter,false
if the given filter isn't a sub-filter or isnull
- See Also:
-
equalsFilter
Description copied from class:FilteredItemsSelectionDialog.ItemsFilter
Checks whether the provided filter is equal to the current filter. The default implementation checks ifSearchPattern
from current filter is equal to the one from provided filter.- Overrides:
equalsFilter
in classFilteredItemsSelectionDialog.ItemsFilter
- Parameters:
iFilter
- filter to be checked, ornull
- Returns:
true
if the given filter is equal to current filter,false
if given filter isn't equal to current one or if it isnull
- See Also:
-
isShowDerived
public boolean isShowDerived()Check show derived flag for a filter- Returns:
- true if filter allow derived resources false if not
-