public class BaseNewWizardMenu extends CompoundContributionItem
BaseNewWizardMenu
is used to populate a menu manager with
New Wizard actions for the current perspective's new wizard shortcuts,
including an Other... action to open the new wizard dialog.
Note: Clients must dispose this menu when it is no longer required.
Constructor and Description |
---|
BaseNewWizardMenu(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.
|
protected boolean |
addShortcuts(List list)
Adds the new wizard shortcuts for the current perspective to the given list.
|
void |
dispose()
The default implementation of this
IContributionItem
method does nothing. |
protected IContributionItem[] |
getContributionItems()
Return a list of contributions items that will replace this item in the
parent manager.
|
protected IAction |
getShowDialogAction()
Returns the "Other..." action, used to show the new wizards dialog.
|
protected IWorkbenchWindow |
getWindow()
Returns the window in which this menu appears.
|
protected boolean |
registryHasCategory(String categoryId)
Returns whether the new wizards registry has a non-empty category with
the given identifier.
|
fill, isDirty, isDynamic, setParent
fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
public BaseNewWizardMenu(IWorkbenchWindow window, String id)
Note: Clients must dispose this menu when it is no longer required.
window
- the window containing the menuid
- the contribution item identifier, or null
protected void addItems(List list)
list
- the list to add items toprotected boolean addShortcuts(List list)
list
- the list to add items totrue
if any items were added, false
if none were addedpublic void dispose()
ContributionItem
IContributionItem
method does nothing. Subclasses may override.dispose
in interface IContributionItem
dispose
in class CompoundContributionItem
protected IContributionItem[] getContributionItems()
CompoundContributionItem
getContributionItems
in class CompoundContributionItem
null
.protected IAction getShowDialogAction()
protected IWorkbenchWindow getWindow()
protected boolean registryHasCategory(String categoryId)
categoryId
- the identifier for the categorytrue
if there is a non-empty category with the
given identifier, false
otherwise
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.