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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.eclipse.ui.internal.registry.RegistryReader
      extended byorg.eclipse.ui.internal.PluginActionBuilder
Direct Known Subclasses:
EditorActionBuilder, ObjectActionContributor, PluginActionSetBuilder, ViewActionBuilder, ViewerActionBuilder

public abstract class PluginActionBuilder
extends org.eclipse.ui.internal.registry.RegistryReader

This class contains shared functionality for reading action contributions from plugins into workbench parts (both editors and views).


Nested Class Summary
protected static class PluginActionBuilder.BasicContribution
          Helper class to collect the menus and actions defined within a contribution element.
 
Field Summary
static java.lang.String ATT_ENABLES_FOR
           
static java.lang.String ATT_ID
           
static java.lang.String ATT_LABEL
           
static java.lang.String ATT_NAME
           
static java.lang.String ATT_PATH
           
static java.lang.String ATT_TARGET_ID
           
protected  java.util.ArrayList cache
           
protected  PluginActionBuilder.BasicContribution currentContribution
           
static java.lang.String TAG_ACTION
           
static java.lang.String TAG_ENABLEMENT
           
static java.lang.String TAG_FILTER
           
static java.lang.String TAG_GROUP_MARKER
           
static java.lang.String TAG_MENU
           
static java.lang.String TAG_SELECTION
           
static java.lang.String TAG_SEPARATOR
           
static java.lang.String TAG_VISIBILITY
           
protected  java.lang.String targetContributionTag
           
protected  java.lang.String targetID
           
 
Fields inherited from class org.eclipse.ui.internal.registry.RegistryReader
TAG_DESCRIPTION
 
Constructor Summary
PluginActionBuilder()
          The default constructor.
 
Method Summary
 void contribute(org.eclipse.jface.action.IMenuManager menu, org.eclipse.jface.action.IToolBarManager toolbar, boolean appendIfMissing)
          Contributes submenus and/or actions into the provided menu and tool bar managers.
protected abstract  ActionDescriptor createActionDescriptor(org.eclipse.core.runtime.IConfigurationElement element)
          This factory method returns a new ActionDescriptor for the configuration element.
protected  PluginActionBuilder.BasicContribution createContribution()
          Factory method to create the helper contribution class that will hold onto the menus and actions contributed.
protected  java.lang.String getTargetID(org.eclipse.core.runtime.IConfigurationElement element)
          Returns the name of the part ID attribute that is expected in the target extension.
protected  void readContributions(java.lang.String id, java.lang.String tag, java.lang.String extensionPoint)
          Reads the contributions from the registry for the provided workbench part and the provided extension point ID.
protected  boolean readElement(org.eclipse.core.runtime.IConfigurationElement element)
          Implements abstract method to handle the provided XML element in the registry.
 
Methods inherited from class org.eclipse.ui.internal.registry.RegistryReader
getDescription, logError, logMissingAttribute, logMissingElement, logUnknownElement, orderExtensions, readElementChildren, readElements, readExtension, readRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_MENU

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

TAG_ACTION

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

TAG_SEPARATOR

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

TAG_GROUP_MARKER

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

TAG_FILTER

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

TAG_VISIBILITY

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

TAG_ENABLEMENT

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

TAG_SELECTION

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

ATT_TARGET_ID

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

ATT_ID

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

ATT_LABEL

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

ATT_ENABLES_FOR

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

ATT_NAME

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

ATT_PATH

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

targetID

protected java.lang.String targetID

targetContributionTag

protected java.lang.String targetContributionTag

currentContribution

protected PluginActionBuilder.BasicContribution currentContribution

cache

protected java.util.ArrayList cache
Constructor Detail

PluginActionBuilder

public PluginActionBuilder()
The default constructor.

Method Detail

contribute

public final void contribute(org.eclipse.jface.action.IMenuManager menu,
                             org.eclipse.jface.action.IToolBarManager toolbar,
                             boolean appendIfMissing)
Contributes submenus and/or actions into the provided menu and tool bar managers.


createActionDescriptor

protected abstract ActionDescriptor createActionDescriptor(org.eclipse.core.runtime.IConfigurationElement element)
This factory method returns a new ActionDescriptor for the configuration element. It should be implemented by subclasses.


createContribution

protected PluginActionBuilder.BasicContribution createContribution()
Factory method to create the helper contribution class that will hold onto the menus and actions contributed.


getTargetID

protected java.lang.String getTargetID(org.eclipse.core.runtime.IConfigurationElement element)
Returns the name of the part ID attribute that is expected in the target extension.


readContributions

protected void readContributions(java.lang.String id,
                                 java.lang.String tag,
                                 java.lang.String extensionPoint)
Reads the contributions from the registry for the provided workbench part and the provided extension point ID.


readElement

protected boolean readElement(org.eclipse.core.runtime.IConfigurationElement element)
Implements abstract method to handle the provided XML element in the registry.