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

Constructors
Constructor and Description
`ResourceFilter()` Creates new ResourceFilter instance
`ResourceFilter(IContainer container, boolean showDerived, int typeMask)` Creates new ResourceFilter instance

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equalsFilter(FilteredItemsSelectionDialog.ItemsFilter iFilter)` Checks whether the provided filter is equal to the current filter.
`boolean` `isConsistentItem(Object item)` Checks consistency of an item.
`boolean` `isShowDerived()` Check show derived flag for a filter
`boolean` `isSubFilter(FilteredItemsSelectionDialog.ItemsFilter filter)` Check if the given filter is a sub-filter of this filter.
`boolean` `matchItem(Object item)` Matches an item against filter conditions.

### Methods inherited from class org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter

`getMatchRule, getPattern, isCamelCasePattern, matches, matchesRawNamePattern`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ResourceFilter

    public ResourceFilter(IContainer container,
                          boolean showDerived,
                          int typeMask)

Creates new ResourceFilter instance

Parameters:
  `container` -
  `showDerived` - flag which determine showing derived elements
  `typeMask` -

#### ResourceFilter

    public ResourceFilter()

Creates new ResourceFilter instance

### Method Detail

#### isConsistentItem

    public boolean isConsistentItem(Object item)

Description copied from class: `FilteredItemsSelectionDialog.ItemsFilter`
Checks consistency of an item. Item is inconsistent if was changed or removed.

Specified by:
  `isConsistentItem` in class `FilteredItemsSelectionDialog.ItemsFilter`
Parameters:
  `item` - Must be instance of IResource, otherwise `false` will be returned.
Returns:
  `true` if item is consistent, `false` if item is inconsistent
See Also:
  `FilteredItemsSelectionDialog.ItemsFilter.isConsistentItem(java.lang.Object)`

#### matchItem

    public boolean matchItem(Object item)

Description copied from class: `FilteredItemsSelectionDialog.ItemsFilter`
Matches an item against filter conditions.

Specified by:
  `matchItem` in class `FilteredItemsSelectionDialog.ItemsFilter`
Parameters:
  `item` - Must be instance of IResource, otherwise `false` will be returned.
Returns:
  `true`if item matches against filter conditions, `false` otherwise``
See Also:
  `FilteredItemsSelectionDialog.ItemsFilter.matchItem(java.lang.Object)`

#### isSubFilter

    public boolean isSubFilter(FilteredItemsSelectionDialog.ItemsFilter filter)

Description copied from class: `FilteredItemsSelectionDialog.ItemsFilter`
Check if the given filter is a sub-filter of this filter. The default implementation checks if the `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.

Overrides:
  `isSubFilter` in class `FilteredItemsSelectionDialog.ItemsFilter`
Parameters:
  `filter` - the filter to be checked, or `null`
Returns:
  `true` if the given filter is sub-filter of this filter, `false` if the given filter isn't a sub-filter or is `null`
See Also:
  `SearchPattern.isSubPattern(org.eclipse.ui.dialogs.SearchPattern)`

#### equalsFilter

    public boolean equalsFilter(FilteredItemsSelectionDialog.ItemsFilter iFilter)

Description copied from class: `FilteredItemsSelectionDialog.ItemsFilter`
Checks whether the provided filter is equal to the current filter. The default implementation checks if `SearchPattern` from current filter is equal to the one from provided filter.

Overrides:
  `equalsFilter` in class `FilteredItemsSelectionDialog.ItemsFilter`
Parameters:
  `iFilter` - filter to be checked, or `null`
Returns:
  `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`
See Also:
  `SearchPattern.equalsPattern(org.eclipse.ui.dialogs.SearchPattern)`

#### isShowDerived

    public boolean isShowDerived()

Check show derived flag for a filter

Returns:
  true if filter allow derived resources false if not