Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ui.internal
Class ActionDescriptor  view ActionDescriptor download ActionDescriptor.java

java.lang.Object
  extended byorg.eclipse.ui.internal.ActionDescriptor
All Implemented Interfaces:
org.eclipse.ui.IPluginContribution

public class ActionDescriptor
extends java.lang.Object
implements org.eclipse.ui.IPluginContribution

When 'action' tag is found in the registry, an object of this class is created. It creates the appropriate action object and captures information that is later used to add this action object into menu/tool bar. This class is reused for global (workbench) menu/tool bar, popup menu actions, as well as view's pulldown and local tool bar.


Field Summary
private  PluginAction action
           
static java.lang.String ATT_ACCELERATOR
           
static java.lang.String ATT_ALLOW_LABEL_UPDATE
           
static java.lang.String ATT_CLASS
           
static java.lang.String ATT_DEFINITION_ID
           
static java.lang.String ATT_DESCRIPTION
           
static java.lang.String ATT_DISABLEDICON
           
static java.lang.String ATT_HELP_CONTEXT_ID
           
static java.lang.String ATT_HOVERICON
           
static java.lang.String ATT_ICON
           
static java.lang.String ATT_ID
           
static java.lang.String ATT_LABEL
           
static java.lang.String ATT_MENUBAR_PATH
           
static java.lang.String ATT_RETARGET
           
static java.lang.String ATT_STATE
           
static java.lang.String ATT_STYLE
           
static java.lang.String ATT_TOOLBAR_PATH
           
static java.lang.String ATT_TOOLTIP
           
private  java.lang.String id
           
private  java.lang.String menuGroup
           
private  java.lang.String menuPath
           
private  java.lang.String pluginId
           
static java.lang.String STYLE_PULLDOWN
           
static java.lang.String STYLE_PUSH
           
static java.lang.String STYLE_RADIO
           
static java.lang.String STYLE_TOGGLE
           
static int T_EDITOR
           
static int T_POPUP
           
static int T_VIEW
           
static int T_WORKBENCH
           
static int T_WORKBENCH_PULLDOWN
           
private  java.lang.String toolbarGroupId
           
private  java.lang.String toolbarId
           
 
Constructor Summary
ActionDescriptor(org.eclipse.core.runtime.IConfigurationElement actionElement, int targetType)
          Creates a new descriptor with the specified target.
ActionDescriptor(org.eclipse.core.runtime.IConfigurationElement actionElement, int targetType, java.lang.Object target)
          Creates a new descriptor with the target and destination workbench part it will go into.
 
Method Summary
private  PluginAction createAction(int targetType, org.eclipse.core.runtime.IConfigurationElement actionElement, java.lang.Object target, java.lang.String style)
          Creates an instance of PluginAction.
 PluginAction getAction()
          Returns the action object held in this descriptor.
 java.lang.String getId()
          Returns action's id as defined in the registry.
 java.lang.String getLocalId()
           
 java.lang.String getMenuGroup()
          Returns named slot (group) in the menu where this action should be added.
 java.lang.String getMenuPath()
          Returns menu path where this action should be added.
 java.lang.String getPluginId()
           
 java.lang.String getToolbarGroupId()
          Returns the named slot (group) in the tool bar where this action should be added.
 java.lang.String getToolbarId()
          Returns id of the tool bar where this action should be added.
private  void processAccelerator(org.eclipse.jface.action.IAction action, java.lang.String acceleratorText)
          Process the accelerator definition.
 java.lang.String toString()
          For debugging only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

action

private PluginAction action

toolbarId

private java.lang.String toolbarId

menuPath

private java.lang.String menuPath

id

private java.lang.String id

pluginId

private java.lang.String pluginId

menuGroup

private java.lang.String menuGroup

toolbarGroupId

private java.lang.String toolbarGroupId

T_POPUP

public static final int T_POPUP
See Also:
Constant Field Values

T_VIEW

public static final int T_VIEW
See Also:
Constant Field Values

T_WORKBENCH

public static final int T_WORKBENCH
See Also:
Constant Field Values

T_EDITOR

public static final int T_EDITOR
See Also:
Constant Field Values

T_WORKBENCH_PULLDOWN

public static final int T_WORKBENCH_PULLDOWN
See Also:
Constant Field Values

ATT_ID

public static final java.lang.String ATT_ID
See Also:
Constant Field Values

ATT_DEFINITION_ID

public static final java.lang.String ATT_DEFINITION_ID
See Also:
Constant Field Values

ATT_HELP_CONTEXT_ID

public static final java.lang.String ATT_HELP_CONTEXT_ID
See Also:
Constant Field Values

ATT_LABEL

public static final java.lang.String ATT_LABEL
See Also:
Constant Field Values

ATT_STYLE

public static final java.lang.String ATT_STYLE
See Also:
Constant Field Values

ATT_STATE

public static final java.lang.String ATT_STATE
See Also:
Constant Field Values

ATT_DESCRIPTION

public static final java.lang.String ATT_DESCRIPTION
See Also:
Constant Field Values

ATT_TOOLTIP

public static final java.lang.String ATT_TOOLTIP
See Also:
Constant Field Values

ATT_MENUBAR_PATH

public static final java.lang.String ATT_MENUBAR_PATH
See Also:
Constant Field Values

ATT_TOOLBAR_PATH

public static final java.lang.String ATT_TOOLBAR_PATH
See Also:
Constant Field Values

ATT_ICON

public static final java.lang.String ATT_ICON
See Also:
Constant Field Values

ATT_HOVERICON

public static final java.lang.String ATT_HOVERICON
See Also:
Constant Field Values

ATT_DISABLEDICON

public static final java.lang.String ATT_DISABLEDICON
See Also:
Constant Field Values

ATT_CLASS

public static final java.lang.String ATT_CLASS
See Also:
Constant Field Values

ATT_RETARGET

public static final java.lang.String ATT_RETARGET
See Also:
Constant Field Values

ATT_ALLOW_LABEL_UPDATE

public static final java.lang.String ATT_ALLOW_LABEL_UPDATE
See Also:
Constant Field Values

ATT_ACCELERATOR

public static final java.lang.String ATT_ACCELERATOR
See Also:
Constant Field Values

STYLE_PUSH

public static final java.lang.String STYLE_PUSH
See Also:
Constant Field Values

STYLE_RADIO

public static final java.lang.String STYLE_RADIO
See Also:
Constant Field Values

STYLE_TOGGLE

public static final java.lang.String STYLE_TOGGLE
See Also:
Constant Field Values

STYLE_PULLDOWN

public static final java.lang.String STYLE_PULLDOWN
See Also:
Constant Field Values
Constructor Detail

ActionDescriptor

public ActionDescriptor(org.eclipse.core.runtime.IConfigurationElement actionElement,
                        int targetType)
Creates a new descriptor with the specified target.


ActionDescriptor

public ActionDescriptor(org.eclipse.core.runtime.IConfigurationElement actionElement,
                        int targetType,
                        java.lang.Object target)
Creates a new descriptor with the target and destination workbench part it will go into.

Method Detail

createAction

private PluginAction createAction(int targetType,
                                  org.eclipse.core.runtime.IConfigurationElement actionElement,
                                  java.lang.Object target,
                                  java.lang.String style)
Creates an instance of PluginAction. Depending on the target part, subclasses of this class may be created.


getAction

public PluginAction getAction()
Returns the action object held in this descriptor.


getId

public java.lang.String getId()
Returns action's id as defined in the registry.


getMenuGroup

public java.lang.String getMenuGroup()
Returns named slot (group) in the menu where this action should be added.


getMenuPath

public java.lang.String getMenuPath()
Returns menu path where this action should be added. If null, the action will not be added into the menu.


getToolbarGroupId

public java.lang.String getToolbarGroupId()
Returns the named slot (group) in the tool bar where this action should be added.


getToolbarId

public java.lang.String getToolbarId()
Returns id of the tool bar where this action should be added. If null, action will not be added to the tool bar.


toString

public java.lang.String toString()
For debugging only.


processAccelerator

private void processAccelerator(org.eclipse.jface.action.IAction action,
                                java.lang.String acceleratorText)
Process the accelerator definition. If it is a number then process the code directly - if not then parse it and create the code


getLocalId

public java.lang.String getLocalId()
Specified by:
getLocalId in interface org.eclipse.ui.IPluginContribution

getPluginId

public java.lang.String getPluginId()
Specified by:
getPluginId in interface org.eclipse.ui.IPluginContribution