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
ConstructorsConstructorDescriptionSwitchToWindowMenu(IWorkbenchWindow window, String id, boolean showSeparator) Creates a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()The default implementation of thisIContributionItemmethod does nothing.voidFills the given menu with menu items for all opened workbench windows.booleanisDirty()Overridden to always return true and force dynamic menu building.booleanOverridden 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:
fillin interfaceIContributionItem- Overrides:
fillin classContributionItem- Parameters:
menu- the parent menuindex- the index where the controls are inserted, or-1to insert at the end
-
isDirty
public boolean isDirty()Overridden to always return true and force dynamic menu building.- Specified by:
isDirtyin interfaceIContributionItem- Overrides:
isDirtyin classContributionItem- Returns:
trueif this item is dirty
-
isDynamic
public boolean isDynamic()Overridden to always return true and force dynamic menu building.- Specified by:
isDynamicin interfaceIContributionItem- Overrides:
isDynamicin classContributionItem- Returns:
trueif this item is dynamic, andfalsefor normal items
-
dispose
public void dispose()Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod does nothing. Subclasses may override.- Specified by:
disposein interfaceIContributionItem- Overrides:
disposein classContributionItem
-