Package org.eclipse.ui.internal
Class WorkingSetMenuContributionItem
java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.ui.internal.WorkingSetMenuContributionItem
- All Implemented Interfaces:
IContributionItem
Menu contribution item which shows a working set.
- Since:
- 2.1
-
Constructor Summary
ConstructorDescriptionWorkingSetMenuContributionItem
(int id, WorkingSetFilterActionGroup actionGroup, IWorkingSet workingSet) Creates a new instance of the receiver. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
The default implementation of thisIContributionItem
method does nothing.void
Adds a menu item for the working set.static String
getId
(int id) Returns the id of this menu contribution itemboolean
Overridden to always return true and force dynamic menu building.Methods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isDirty, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update
-
Constructor Details
-
WorkingSetMenuContributionItem
public WorkingSetMenuContributionItem(int id, WorkingSetFilterActionGroup actionGroup, IWorkingSet workingSet) Creates a new instance of the receiver.- Parameters:
id
- sequential id of the new instanceactionGroup
- the action group this contribution item is created in
-
-
Method Details
-
getId
Returns the id of this menu contribution item- Parameters:
id
- numerical id- Returns:
- String string id
-
fill
Adds a menu item for the working set. Overrides method from ContributionItem.- Specified by:
fill
in interfaceIContributionItem
- Overrides:
fill
in classContributionItem
- Parameters:
menu
- the parent menuindex
- the index where the controls are inserted, or-1
to insert at the end- See Also:
-
isDynamic
public boolean isDynamic()Overridden to always return true and force dynamic menu building.- Specified by:
isDynamic
in interfaceIContributionItem
- Overrides:
isDynamic
in classContributionItem
- Returns:
true
if this item is dynamic, andfalse
for normal items
-
dispose
public void dispose()Description copied from class:ContributionItem
The default implementation of thisIContributionItem
method does nothing. Subclasses may override.- Specified by:
dispose
in interfaceIContributionItem
- Overrides:
dispose
in classContributionItem
-