|
|
|
|
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
-
public class NewWizardMenu
- extends
BaseNewWizardMenu
A NewWizardMenu augments BaseNewWizardMenu with IDE-specific
actions: New Project... (always shown) and New Example... (shown only if there are example wizards installed).
Method Summary
|
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. |
Methods inherited from class org.eclipse.jface.action.
ContributionItem
|
fill,
fill,
fill,
getId,
getParent,
isGroupMarker,
isSeparator,
isVisible,
saveWidgetState,
setId,
setVisible,
toString,
update,
update
|
NewWizardMenu
public NewWizardMenu(
IWorkbenchWindow window)
- Creates a new wizard shortcut menu for the IDE.
-
Parameters:
-
window - the window containing the menu
NewWizardMenu
public NewWizardMenu(
IWorkbenchWindow window,
String id)
- Creates a new wizard shortcut menu for the IDE.
-
Parameters:
-
window - the window containing the menu -
id - the identifier for this contribution item
NewWizardMenu
public NewWizardMenu(
IMenuManager innerMgr,
IWorkbenchWindow window,
boolean register)
-
Deprecated. use NewWizardMenu(IWorkbenchWindow) instead
- Create 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 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.
-
Parameters:
-
innerMgr - the location for the shortcut menu contents -
window - the window containing the menu -
register - if true the menu listens to perspective changes in
the window
deregisterListeners
public void deregisterListeners()
-
Deprecated. has no effect
- Removes all listeners from the containing workbench window.
This method should only be called if the shortcut menu is created with
register = true .
-
addItems
protected void addItems(
List list)
-
Description copied from class:
BaseNewWizardMenu
- Adds the items to show to the given list.
-
-
Overrides:
-
addItems
in class
BaseNewWizardMenu
-
-
Parameters:
-
list - the list to add items to
isEnabled
public boolean isEnabled()
-
Description copied from class:
ContributionItem
- The default implementation of this
IContributionItem
method returns true . Subclasses may override.
-
-
Specified by:
-
isEnabled
in interface
IContributionItem
-
Overrides:
-
isEnabled
in class
ContributionItem
-
-
Returns:
-
true if this item is enabled
setEnabled
public void setEnabled(boolean enabledValue)
- Sets the enabled state of the receiver.
-
-
Parameters:
-
enabledValue - if true the menu is enabled; else
it is disabled
getContributionItems
protected
IContributionItem[] getContributionItems()
-
Description copied from class:
CompoundContributionItem
- Return 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:
-
getContributionItems
in class
BaseNewWizardMenu
-
-
Returns:
- an array list of items to display. Must not be
null .
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.
|
|
|