|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.actions.ActionGroup | +--org.eclipse.jdt.ui.actions.MemberFilterActionGroup
Action Group that contributes filter buttons for a view parts showing methods and fields. Contributed filters are: hide fields, hide static members and hide non-public members.
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.
Field Summary | |
static int |
FILTER_FIELDS
|
static int |
FILTER_NONPUBLIC
|
static int |
FILTER_STATIC
|
Constructor Summary | |
MemberFilterActionGroup(StructuredViewer viewer,
String viewerId)
Creates a new MemberFilterActionGroup . |
Method Summary | |
void |
contributeToToolBar(IToolBarManager tbm)
Adds the filter actions to the given tool bar |
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 |
public static final int FILTER_NONPUBLIC
public static final int FILTER_STATIC
public static final int FILTER_FIELDS
Constructor Detail |
public MemberFilterActionGroup(StructuredViewer viewer, String viewerId)
MemberFilterActionGroup
.
viewer
- the viewer to be filteredviewerId
- a unique id of the viewer. Used as a key to to store
the last used filter settings in the preference storeMethod Detail |
public void setMemberFilter(int filterProperty, boolean set)
filterProperty
- the filter to be manipulated. Valid values are FILTER_FIELDS
,
FILTER_PUBLIC
, and FILTER_PRIVATE
as defined by this action
groupset
- if true
the given filter is installed. If false
the
given filter is removed
.public boolean hasMemberFilter(int filterProperty)
true
if the given filter is installed.
filterProperty
- the filter to be tested. Valid values are FILTER_FIELDS
,
FILTER_PUBLIC
, and FILTER_PRIVATE
as defined by this action
grouppublic void saveState(IMemento memento)
memento
- the memento to which the state is savedpublic void restoreState(IMemento memento)
Note: This method does not refresh the viewer.
memento
- the memento from which the state is restoredpublic void fillActionBars(IActionBars actionBars)
fillActionBars
in class ActionGroup
public void contributeToToolBar(IToolBarManager tbm)
tbm
- the tool bar to which the actions are addedpublic void dispose()
dispose
in class ActionGroup
|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |