Eclipse Platform
Release 3.1

org.eclipse.ui.actions
Class NewWizardMenu

java.lang.Object
  extended byorg.eclipse.jface.action.ContributionItem
      extended byorg.eclipse.ui.actions.CompoundContributionItem
          extended byorg.eclipse.ui.actions.BaseNewWizardMenu
              extended byorg.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).


Constructor Summary
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.
 
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()
           
 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.ui.actions.BaseNewWizardMenu
addShortcuts, dispose, getShowDialogAction, getWindow, registryHasCategory
 
Methods inherited from class org.eclipse.ui.actions.CompoundContributionItem
fill, isDirty, isDynamic, setParent
 
Methods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isGroupMarker, isSeparator, isVisible, saveWidgetState, setVisible, toString, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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
Method Detail

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

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()
Overrides:
getContributionItems in class BaseNewWizardMenu

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.