Package org.eclipse.ui.internal
Class SwitchToWindowMenu
java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.ui.internal.SwitchToWindowMenu
- All Implemented Interfaces:
IContributionItem
A dynamic menu item to switch to other opened workbench windows.
-
Constructor Summary
ConstructorDescriptionSwitchToWindowMenu
(IWorkbenchWindow window, String id, boolean showSeparator) Creates a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
The default implementation of thisIContributionItem
method does nothing.void
Fills the given menu with menu items for all opened workbench windows.boolean
isDirty()
Overridden to always return true and force dynamic menu building.boolean
Overridden to always return true and force dynamic menu building.Methods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update
-
Constructor Details
-
SwitchToWindowMenu
Creates a new instance of this class.- Parameters:
window
- the workbench window this action applies toshowSeparator
- whether to add a separator in the menu
-
-
Method Details
-
fill
Fills the given menu with menu items for all opened workbench windows.- 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
-
isDirty
public boolean isDirty()Overridden to always return true and force dynamic menu building.- Specified by:
isDirty
in interfaceIContributionItem
- Overrides:
isDirty
in classContributionItem
- Returns:
true
if this item is dirty
-
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
-