Package org.eclipse.ui.actions
Class NewWizardMenu
java.lang.Object
org.eclipse.jface.action.ContributionItem
org.eclipse.ui.actions.CompoundContributionItem
org.eclipse.ui.actions.BaseNewWizardMenu
org.eclipse.ui.actions.NewWizardMenu
- All Implemented Interfaces:
IContributionItem
A
NewWizardMenu augments BaseNewWizardMenu with IDE-specific
actions: New Project... (always shown) and New Example... (shown only if there are example wizards installed).
Note: Clients must dispose this menu when it is no longer required.
-
Constructor Summary
ConstructorsConstructorDescriptionNewWizardMenu(IMenuManager innerMgr, IWorkbenchWindow window, boolean register) Deprecated.use NewWizardMenu(IWorkbenchWindow) insteadNewWizardMenu(IWorkbenchWindow window) Creates a new wizard shortcut menu for the IDE.NewWizardMenu(IWorkbenchWindow window, String id) Creates a new wizard shortcut menu for the IDE. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddItems(List<IContributionItem> list) Adds the contribution items to show to the given list.voidDeprecated.has no effectvoiddispose()The default implementation of thisIContributionItemmethod does nothing.protected IContributionItem[]Return a list of contributions items that will replace this item in the parent manager.booleanThe default implementation of thisIContributionItemmethod returnstrue.voidsetEnabled(boolean enabledValue) Sets the enabled state of the receiver.Methods inherited from class org.eclipse.ui.actions.BaseNewWizardMenu
addShortcuts, getShowDialogAction, getWindow, registryHasCategoryMethods inherited from class org.eclipse.ui.actions.CompoundContributionItem
fill, isDirty, isDynamic, setParentMethods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
-
Constructor Details
-
NewWizardMenu
Creates a new wizard shortcut menu for the IDE.Note: Clients must dispose this menu when it is no longer required.
- Parameters:
window- the window containing the menu
-
NewWizardMenu
Creates a new wizard shortcut menu for the IDE.Note: Clients must dispose this menu when it is no longer required.
- Parameters:
window- the window containing the menuid- the identifier for this contribution item
-
NewWizardMenu
Deprecated.use NewWizardMenu(IWorkbenchWindow) insteadCreate a new wizard shortcut menu.If the menu will appear on a semi-permanent basis, for instance within a toolbar or menubar, the value passed for
registershould be true. If set, the menu will listen to perspective activation and update itself to suit. In this case clients are expected to callderegisterwhen the menu is no longer needed. This will unhook any perspective listeners.Note: Clients must dispose this menu when it is no longer required.
- Parameters:
innerMgr- the location for the shortcut menu contentswindow- the window containing the menuregister- iftruethe menu listens to perspective changes in the window
-
-
Method Details
-
deregisterListeners
Deprecated.has no effectRemoves all listeners from the containing workbench window.This method should only be called if the shortcut menu is created with
register = true. -
addItems
Description copied from class:BaseNewWizardMenuAdds the contribution items to show to the given list.- Overrides:
addItemsin classBaseNewWizardMenu- Parameters:
list- the list to add contribution items to
-
isEnabled
public boolean isEnabled()Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod returnstrue. Subclasses may override.- Specified by:
isEnabledin interfaceIContributionItem- Overrides:
isEnabledin classContributionItem- Returns:
trueif this item is enabled
-
setEnabled
public void setEnabled(boolean enabledValue) Sets the enabled state of the receiver.- Parameters:
enabledValue- iftruethe menu is enabled; else it is disabled
-
getContributionItems
Description copied from class:CompoundContributionItemReturn a list of contributions items that will replace this item in the parent manager. The list must contain new contribution items every call since the old ones will be disposed.- Overrides:
getContributionItemsin classBaseNewWizardMenu- Returns:
- an array list of items to display. Must not be
null.
-
dispose
public void dispose()Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod does nothing. Subclasses may override.- Specified by:
disposein interfaceIContributionItem- Overrides:
disposein classBaseNewWizardMenu
-