Package org.eclipse.jdt.ui.actions
Class CustomFiltersActionGroup
java.lang.Object
org.eclipse.ui.actions.ActionGroup
org.eclipse.jdt.ui.actions.CustomFiltersActionGroup
public class CustomFiltersActionGroup
extends org.eclipse.ui.actions.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.
- Since:
- 2.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorsConstructorDescriptionCustomFiltersActionGroup(String ownerId, org.eclipse.jface.viewers.StructuredViewer viewer) Creates a newCustomFiltersActionGroup.CustomFiltersActionGroup(org.eclipse.ui.IViewPart part, org.eclipse.jface.viewers.StructuredViewer viewer) Creates a newCustomFiltersActionGroup. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()voidfillActionBars(org.eclipse.ui.IActionBars actionBars) voidfillViewMenu(org.eclipse.jface.action.IMenuManager viewMenu) Fills the given view menu with the entries managed by the group.String[]Returns a list of currently enabled filters.String[]removeFiltersFor(Object parent, Object element, org.eclipse.jface.viewers.IContentProvider contentProvider) Removes filters for the given parent and elementvoidrestoreState(org.eclipse.ui.IMemento memento) Restores the state of the filter actions from a memento.voidsaveState(org.eclipse.ui.IMemento memento) Saves the state of the custom filters in a memento.voidsetFilters(String[] newFilters) Sets the filters to the given array of new filtersMethods inherited from class org.eclipse.ui.actions.ActionGroup
fillContextMenu, getContext, setContext, updateActionBars
-
Constructor Details
-
CustomFiltersActionGroup
public CustomFiltersActionGroup(org.eclipse.ui.IViewPart part, org.eclipse.jface.viewers.StructuredViewer viewer) Creates a newCustomFiltersActionGroup.- Parameters:
part- the view part that owns this action groupviewer- the viewer to be filtered
-
CustomFiltersActionGroup
Creates a newCustomFiltersActionGroup.- Parameters:
ownerId- the id of this action group's ownerviewer- the viewer to be filtered
-
-
Method Details
-
fillActionBars
public void fillActionBars(org.eclipse.ui.IActionBars actionBars) - Overrides:
fillActionBarsin classorg.eclipse.ui.actions.ActionGroup
-
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
- Since:
- 3.1
- Restriction:
- This method is not intended to be referenced by clients.
-
removeFiltersFor
public String[] removeFiltersFor(Object parent, Object element, org.eclipse.jface.viewers.IContentProvider contentProvider) Removes filters for the given parent and element- Parameters:
parent- the parent of the elementelement- the elementcontentProvider- the content provider of the viewer from which the filters will be removed- Returns:
- the array of new filter ids
-
setFilters
Sets the filters to the given array of new filters- Parameters:
newFilters- the new filters
-
fillViewMenu
public void fillViewMenu(org.eclipse.jface.action.IMenuManager viewMenu) Fills the given view menu with the entries managed by the group.- Parameters:
viewMenu- the menu to fill
-
dispose
public void dispose()- Overrides:
disposein classorg.eclipse.ui.actions.ActionGroup
-
saveState
public void saveState(org.eclipse.ui.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(org.eclipse.ui.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
-