Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.navigator
Class WizardActionGroup

java.lang.Object
  extended by 

org.eclipse.ui.actions.ActionGroup
      extended by 
org.eclipse.ui.navigator.WizardActionGroup

public final class WizardActionGroup
extends ActionGroup

Populates context menus with shortcut actions for defined wizards. Wizards may be defined by any of the following extension points:

  • org.eclipse.ui.newWizards
  • org.eclipse.ui.importWizards
  • org.eclipse.ui.exportWizards

Here are the required steps for using this feature correctly:

  1. Declare all new/import/export wizards from the extension points above, or locate the existing wizards that you intend to reuse.
  2. Declare org.eclipse.ui.navigator.navigatorContent/commonWizard elements to identify which wizards should be associated with what items in your viewer or navigator.
  3. If you are using Resources in your viewer and have bound the resource extension declared in org.eclipse.ui.navigator.resources, then you will get most of this functionality for free.
  4. Otherwise, you may choose to build your own custom menu. In which case, you may instantiate this class, and hand it the menu or submenu that you want to list out the available wizard shortcuts via fillContextMenu(IMenuManager).

Since:
3.2
See Also:
PlatformUI.getWorkbench(), IWorkbench.getNewWizardRegistry(), IWorkbench.getImportWizardRegistry(), IWorkbench.getExportWizardRegistry()

Field Summary
static  String TYPE_EXPORT
          The type for commonWizard extensions with the value "new" for their type attribute.
static  String TYPE_IMPORT
          The type for commonWizard extensions with the value "new" for their type attribute.
static  String TYPE_NEW
          The type for commonWizard extensions with the value "new" for their type attribute.
 
Constructor Summary
WizardActionGroup ( IWorkbenchWindow aWindow, IWizardRegistry aWizardRegistry, String aType)
           
WizardActionGroup ( IWorkbenchWindow aWindow, IWizardRegistry aWizardRegistry, String aType, INavigatorContentService aContentService)
           
 
Method Summary
 void dispose ()
          This method is called by the user of an action group to signal that the group is no longer needed.
 void fillContextMenu ( IMenuManager menu)
          Adds the applicable actions to a context menu, based on the state of the ActionContext.
protected   IAction getAction ( String id)
           
protected   Map getActions ()
           
  String[] getWizardActionIds ()
           
 void setContext ( ActionContext aContext)
          Sets the context used to determine which actions are added, and what their enabled state should be.
 
Methods inherited from class org.eclipse.ui.actions. ActionGroup
fillActionBars, getContext, updateActionBars
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NEW

public static final 
String TYPE_NEW
The type for commonWizard extensions with the value "new" for their type attribute.

See Also:
Constant Field Values

TYPE_IMPORT

public static final 
String TYPE_IMPORT
The type for commonWizard extensions with the value "new" for their type attribute.

See Also:
Constant Field Values

TYPE_EXPORT

public static final 
String TYPE_EXPORT
The type for commonWizard extensions with the value "new" for their type attribute.

See Also:
Constant Field Values
Constructor Detail

WizardActionGroup

public WizardActionGroup(
IWorkbenchWindow aWindow,
                         
IWizardRegistry aWizardRegistry,
                         
String aType)
Parameters:
aWindow - The window that will be used to acquire a Shell and a Selection Service
aWizardRegistry - The wizard registry will be used to locate the correct wizard descriptions.
aType - Indicates the value of the type attribute of the commonWizard extension point. Use any of the TYPE_XXX constants defined on this class.
See Also:
PlatformUI.getWorkbench(), IWorkbench.getNewWizardRegistry(), IWorkbench.getImportWizardRegistry(), IWorkbench.getExportWizardRegistry()

WizardActionGroup

public WizardActionGroup(
IWorkbenchWindow aWindow,
                         
IWizardRegistry aWizardRegistry,
                         
String aType,
                         
INavigatorContentService aContentService)
Parameters:
aWindow - The window that will be used to acquire a Shell and a Selection Service
aWizardRegistry - The wizard registry will be used to locate the correct wizard descriptions.
aType - Indicates the value of the type attribute of the commonWizard extension point. Use any of the TYPE_XXX constants defined on this class.
aContentService - The content service to use when deciding visibility.
See Also:
PlatformUI.getWorkbench(), IWorkbench.getNewWizardRegistry(), IWorkbench.getImportWizardRegistry(), IWorkbench.getExportWizardRegistry()
Method Detail

setContext

public void setContext(
ActionContext aContext)
Description copied from class: ActionGroup
Sets the context used to determine which actions are added, and what their enabled state should be.

Overrides:
setContext in class ActionGroup
Parameters:
aContext - the context to use

fillContextMenu

public void fillContextMenu(
IMenuManager menu)
Description copied from class: ActionGroup
Adds the applicable actions to a context menu, based on the state of the ActionContext.

The default implementation does nothing. Subclasses may override or extend this method.

Overrides:
fillContextMenu in class ActionGroup
Parameters:
menu - the context menu manager

dispose

public void dispose()
Description copied from class: ActionGroup
This method is called by the user of an action group to signal that the group is no longer needed. Subclasses typically implement this method to deregister any listeners or to free other resources.

The default implementation calls setContext(null). Subclasses may extend this method.

Overrides:
dispose in class ActionGroup

getAction

protected 
IAction getAction(
String id)

getActions

protected 
Map getActions()
Returns:
a map of (id, IAction)-pairs.

getWizardActionIds

public 
String[] getWizardActionIds()
Returns:
Returns the wizardActionIds.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire