Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jdt.ui.actions
Class MemberFilterActionGroup

    java.lang.Object
      org.eclipse.ui.actions.ActionGroup
          org.eclipse.jdt.ui.actions.MemberFilterActionGroup

public class MemberFilterActionGroup
extends ActionGroup

Action Group that contributes filter buttons for a view parts showing methods and fields. Contributed filters are: hide fields, hide static members hide non-public members and hide local types.

The action group installs a filter on a structured viewer. The filter is connected to the actions installed in the view part's toolbar menu and is updated when the state of the buttons changes.

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

Since:
  2.0

Field Summary
`static int` | `ALL_FILTERS`
`static int` | `FILTER_FIELDS`
`static int` | `FILTER_LOCALTYPES`
`static int` | `FILTER_NONPUBLIC`
`static int` | `FILTER_STATIC`

Constructor Summary
`MemberFilterActionGroup(StructuredViewer viewer, String viewerId)` Creates a new `MemberFilterActionGroup`.
`MemberFilterActionGroup(StructuredViewer viewer, String viewerId, boolean inViewMenu)` Creates a new `MemberFilterActionGroup`.
`MemberFilterActionGroup(StructuredViewer viewer, String viewerId, boolean inViewMenu, int availableFilters)` Creates a new `MemberFilterActionGroup`.

Method Summary
`void` | `contributeToToolBar(IToolBarManager tbm)` Adds the filter actions to the given tool bar
`void` | `contributeToViewMenu(IMenuManager menu)` Adds the filter actions to the given menu manager.
`void` | `dispose()`
`void` | `fillActionBars(IActionBars actionBars)`
`boolean` | `hasMemberFilter(int filterProperty)` Returns `true` if the given filter is installed.
`void` | `restoreState(IMemento memento)` Restores the state of the filter actions from a memento.
`void` | `saveState(IMemento memento)` Saves the state of the filter actions in a memento.
`void` | `setMemberFilter(int filterProperty, boolean set)` Sets the member filters.

Methods inherited from class org.eclipse.ui.actions.ActionGroup
`fillContextMenu, getContext, setContext, updateActionBars`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### FILTER_NONPUBLIC

    public static final int FILTER_NONPUBLIC

See Also:
  Constant Field Values

### FILTER_STATIC

    public static final int FILTER_STATIC

See Also:
  Constant Field Values

### FILTER_FIELDS

    public static final int FILTER_FIELDS

See Also:
  Constant Field Values

### FILTER_LOCALTYPES

    public static final int FILTER_LOCALTYPES

Since:
  3.0
See Also:
  Constant Field Values

### ALL_FILTERS

    public static final int ALL_FILTERS

Since:
  3.0
See Also:
  Constant Field Values

Constructor Detail

### MemberFilterActionGroup

    public MemberFilterActionGroup(StructuredViewer viewer,
                                   String viewerId)

  Creates a new `MemberFilterActionGroup`.

Parameters:
  `viewer` - the viewer to be filtered
  `viewerId` - a unique id of the viewer. Used as a key to to store the last used filter settings in the preference store

### MemberFilterActionGroup

    public MemberFilterActionGroup(StructuredViewer viewer,
                                   String viewerId,
                                   boolean inViewMenu)

  Creates a new `MemberFilterActionGroup`.

Parameters:
  `viewer` - the viewer to be filtered
  `viewerId` - a unique id of the viewer. Used as a key to to store the last used filter settings in the preference store
  `inViewMenu` - if `true` the actions are added to the view menu. If `false` they are added to the toobar.
Since:
  2.1

### MemberFilterActionGroup

    public MemberFilterActionGroup(StructuredViewer viewer,
                                   String viewerId,
                                   boolean inViewMenu,
                                   int availableFilters)

  Creates a new `MemberFilterActionGroup`.

Parameters:
  `viewer` - the viewer to be filtered
  `viewerId` - a unique id of the viewer. Used as a key to to store the last used filter settings in the preference store
  `inViewMenu` - if `true` the actions are added to the view menu. If `false` they are added to the toobar.
  `availableFilters` - Specifies which filter action should be contained. `FILTER_NONPUBLIC`, `FILTER_STATIC`, `FILTER_FIELDS` and `FILTER_LOCALTYPES` or a combination of these constants are possible values. Use `ALL_FILTERS` to select all available filters.
Since:
  3.0

Method Detail

### setMemberFilter

    public void setMemberFilter(int filterProperty,
                                boolean set)

  Sets the member filters.

  Parameters:
    `filterProperty` - the filter to be manipulated. Valid values are `FILTER_FIELDS`, `FILTER_PUBLIC` `FILTER_PRIVATE` and `FILTER_LOCALTYPES_ACTION` as defined by this action group
    `set` - if `true` the given filter is installed. If `false` the given filter is removed .

### hasMemberFilter

    public boolean hasMemberFilter(int filterProperty)

  Returns `true` if the given filter is installed.

  Parameters:
    `filterProperty` - the filter to be tested. Valid values are `FILTER_FIELDS`, `FILTER_PUBLIC`, `FILTER_PRIVATE` and `FILTER_LOCALTYPES` as defined by this action group

### saveState

    public void saveState(IMemento memento)

  Saves the state of the filter actions in a memento.

  Parameters:
    `memento` - the memento to 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

### fillActionBars

    public void fillActionBars(IActionBars actionBars)

### contributeToToolBar

    public void contributeToToolBar(IToolBarManager tbm)

  Adds the filter actions to the given tool bar

  Parameters:
    `tbm` - the tool bar to which the actions are added

### contributeToViewMenu

    public void contributeToViewMenu(IMenuManager menu)

  Adds the filter actions to the given menu manager.

  Parameters:
    `menu` - the menu manager to which the actions are added
  Since:
    2.1

### dispose

    public void dispose()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.