org.eclipse.wst.jsdt.ui.actions

## Class CustomFiltersActionGroup

- java.lang.Object
- - ActionGroup
  - - org.eclipse.wst.jsdt.ui.actions.CustomFiltersActionGroup

    public class CustomFiltersActionGroup
    extends ActionGroup

Action group to add the filter action to a view part's tool bar menu.

This class may be instantiated; it is not intended to be subclassed.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

### Constructor Summary

Constructors
Constructor and Description
`CustomFiltersActionGroup(IViewPart part, StructuredViewer viewer)` Creates a new `CustomFiltersActionGroup`.
`CustomFiltersActionGroup(java.lang.String ownerId, StructuredViewer viewer)` Creates a new `CustomFiltersActionGroup`.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `dispose()`
`void` `fillActionBars(IActionBars actionBars)`
`void` `fillViewMenu(IMenuManager viewMenu)` Fills the given view menu with the entries managed by the group.
`java.lang.String[]` `internalGetEnabledFilterIds()` Returns a list of currently enabled filters.
`java.lang.String[]` `removeFiltersFor(java.lang.Object parent, java.lang.Object element, IContentProvider contentProvider)` Removes filters for the given parent and element
`void` `restoreState(IMemento memento)` Restores the state of the filter actions from a memento.
`void` `saveState(IMemento memento)` Saves the state of the custom filters in a memento.
`void` `setFilters(java.lang.String[] newFilters)` Sets the filters to the given array of new filters

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

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

### Constructor Detail

#### CustomFiltersActionGroup

    public CustomFiltersActionGroup(IViewPart part,
                                    StructuredViewer viewer)

Creates a new `CustomFiltersActionGroup`.

Parameters:
  `part` - the view part that owns this action group
  `viewer` - the viewer to be filtered

#### CustomFiltersActionGroup

    public CustomFiltersActionGroup(java.lang.String ownerId,
                                    StructuredViewer viewer)

Creates a new `CustomFiltersActionGroup`.

Parameters:
  `ownerId` - the id of this action group's owner
  `viewer` - the viewer to be filtered

### Method Detail

#### fillActionBars

    public void fillActionBars(IActionBars actionBars)

#### internalGetEnabledFilterIds

    public java.lang.String[] internalGetEnabledFilterIds()

Returns a list of currently enabled filters. The filter is identified by its id.

This method is for internal use only and should not be called by clients outside of JDT/UI.

Returns:
  a list of currently enabled filters

#### removeFiltersFor

    public java.lang.String[] removeFiltersFor(java.lang.Object parent,
                                               java.lang.Object element,
                                               IContentProvider contentProvider)

Removes filters for the given parent and element

Parameters:
  `parent` - the parent of the element
  `element` - the element
  `contentProvider` - the content provider of the viewer from which the filters will be removed
Returns:
  the array of new filter ids

#### setFilters

    public void setFilters(java.lang.String[] newFilters)

Sets the filters to the given array of new filters

Parameters:
  `newFilters` - the new filters

#### fillViewMenu

    public void fillViewMenu(IMenuManager viewMenu)

Fills the given view menu with the entries managed by the group.

Parameters:
  `viewMenu` - the menu to fill

#### dispose

    public void dispose()

#### saveState

    public void saveState(IMemento memento)

Saves the state of the custom filters in a memento.

Parameters:
  `memento` - the memento into which the state is saved

#### restoreState

    public void restoreState(IMemento memento)

Restores the state of the filter actions from a memento.

Note: This method does not refresh the viewer.

Parameters:
  `memento` - the memento from which the state is restored