Package org.eclipse.ui.internal
Class ReopenEditorMenu
java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.ui.internal.ReopenEditorMenu
- All Implemented Interfaces:
IContributionItem
A dynamic menu item which supports to switch to other Windows.
-
Constructor Summary
ConstructorsConstructorDescriptionReopenEditorMenu(IWorkbenchWindow window, String id, boolean showSeparator) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturn a string suitable for a file MRU list.voiddispose()The default implementation of thisIContributionItemmethod does nothing.voidFills the given menu with menu items for all windows.booleanOverridden 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
-
ReopenEditorMenu
Create a new instance.- Parameters:
window- the window on which the menu is to be createdid- menu's idshowSeparator- whether or not to show a separator
-
-
Method Details
-
calcText
Return a string suitable for a file MRU list. This should not be called outside the framework.- Parameters:
index- the index in the MRU listname- the file nametoolTip- potentially the pathrtl- should it be right-to-left- Returns:
- a string suitable for an MRU file menu
-
fill
Fills the given menu with menu items for all 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
-
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
-