public class NewWizardMenu extends BaseNewWizardMenu
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 and Description |
---|
NewWizardMenu(IMenuManager innerMgr,
IWorkbenchWindow window,
boolean register)
Deprecated.
use NewWizardMenu(IWorkbenchWindow) instead
|
NewWizardMenu(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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addItems(List list)
Adds the items to show to the given list.
|
void |
deregisterListeners()
Deprecated.
has no effect
|
protected IContributionItem[] |
getContributionItems()
Return a list of contributions items that will replace this item in the
parent manager.
|
boolean |
isEnabled()
The default implementation of this
IContributionItem
method returns true . |
void |
setEnabled(boolean enabledValue)
Sets the enabled state of the receiver.
|
addShortcuts, dispose, getShowDialogAction, getWindow, registryHasCategory
fill, isDirty, isDynamic, setParent
fill, fill, fill, getId, getParent, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
public NewWizardMenu(IWorkbenchWindow window)
Note: Clients must dispose this menu when it is no longer required.
window
- the window containing the menupublic NewWizardMenu(IWorkbenchWindow window, String id)
Note: Clients must dispose this menu when it is no longer required.
window
- the window containing the menuid
- the identifier for this contribution itempublic NewWizardMenu(IMenuManager innerMgr, IWorkbenchWindow window, boolean register)
If the menu will appear on a semi-permanent basis, for instance within
a toolbar or menubar, the value passed for register
should be true.
If set, the menu will listen to perspective activation and update itself
to suit. In this case clients are expected to call deregister
when the menu is no longer needed. This will unhook any perspective
listeners.
Note: Clients must dispose this menu when it is no longer required.
innerMgr
- the location for the shortcut menu contentswindow
- the window containing the menuregister
- if true
the menu listens to perspective changes in
the windowpublic void deregisterListeners()
This method should only be called if the shortcut menu is created with
register = true
.
protected void addItems(List list)
BaseNewWizardMenu
addItems
in class BaseNewWizardMenu
list
- the list to add items topublic boolean isEnabled()
ContributionItem
IContributionItem
method returns true
. Subclasses may override.isEnabled
in interface IContributionItem
isEnabled
in class ContributionItem
true
if this item is enabledpublic void setEnabled(boolean enabledValue)
enabledValue
- if true
the menu is enabled; else
it is disabledprotected IContributionItem[] getContributionItems()
CompoundContributionItem
getContributionItems
in class BaseNewWizardMenu
null
.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.