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

Quick Search    Search Deep

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

java.lang.Object
  extended byorg.eclipse.ui.internal.registry.RegistryReader
      extended byorg.eclipse.ui.internal.PluginActionBuilder
          extended byorg.eclipse.ui.internal.ObjectActionContributor
All Implemented Interfaces:
IObjectActionContributor, IObjectContributor

public class ObjectActionContributor
extends PluginActionBuilder
implements IObjectActionContributor

This class describes the object contribution element within the popup menu action registry.


Nested Class Summary
private static class ObjectActionContributor.ObjectContribution
          Helper class to collect the menus and actions defined within a contribution element.
 
Nested classes inherited from class org.eclipse.ui.internal.PluginActionBuilder
PluginActionBuilder.BasicContribution
 
Field Summary
private  boolean adaptable
           
private static java.lang.String ATT_ADAPTABLE
           
private static java.lang.String ATT_NAME_FILTER
           
private  org.eclipse.core.runtime.IConfigurationElement config
           
private  boolean configRead
           
private static java.lang.String P_TRUE
           
private static java.lang.String TAG_ENABLEMENT
           
 
Fields inherited from class org.eclipse.ui.internal.PluginActionBuilder
ATT_ENABLES_FOR, ATT_ID, ATT_LABEL, ATT_NAME, ATT_PATH, ATT_TARGET_ID, cache, currentContribution, TAG_ACTION, TAG_FILTER, TAG_GROUP_MARKER, TAG_MENU, TAG_SELECTION, TAG_SEPARATOR, TAG_VISIBILITY, targetContributionTag, targetID
 
Fields inherited from class org.eclipse.ui.internal.registry.RegistryReader
TAG_DESCRIPTION
 
Constructor Summary
ObjectActionContributor(org.eclipse.core.runtime.IConfigurationElement config)
          The constructor.
 
Method Summary
 boolean canAdapt()
          Return whether or not the receiver can adapt to IResource.
 void contributeObjectActionIdOverrides(java.util.List actionIdOverrides)
          Contribute to the list the action identifiers from other contributions that this contribution wants to override.
 boolean contributeObjectActions(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.action.IMenuManager menu, org.eclipse.jface.viewers.ISelectionProvider selProv, java.util.List actionIdOverrides)
          Contributes actions applicable for the current selection.
 boolean contributeObjectMenus(org.eclipse.jface.action.IMenuManager menu, org.eclipse.jface.viewers.ISelectionProvider selProv)
          Contributes menus applicable for the current selection.
protected  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.
 boolean isApplicableTo(java.lang.Object object)
          Returns true if name filter is not specified for the contribution or the current selection matches the filter.
private  void readConfigElement()
          Reads the configuration element and all the children.
protected  boolean readElement(org.eclipse.core.runtime.IConfigurationElement element)
          Implements abstract method to handle the provided XML element in the registry.
private  boolean testName(java.lang.Object object)
          Returns whether the current selection matches the contribution name filter.
 
Methods inherited from class org.eclipse.ui.internal.PluginActionBuilder
contribute, getTargetID, readContributions
 
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

ATT_NAME_FILTER

private static final java.lang.String ATT_NAME_FILTER
See Also:
Constant Field Values

ATT_ADAPTABLE

private static final java.lang.String ATT_ADAPTABLE
See Also:
Constant Field Values

P_TRUE

private static final java.lang.String P_TRUE
See Also:
Constant Field Values

TAG_ENABLEMENT

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

config

private org.eclipse.core.runtime.IConfigurationElement config

configRead

private boolean configRead

adaptable

private boolean adaptable
Constructor Detail

ObjectActionContributor

public ObjectActionContributor(org.eclipse.core.runtime.IConfigurationElement config)
The constructor.

Method Detail

canAdapt

public boolean canAdapt()
Description copied from interface: IObjectContributor
Return whether or not the receiver can adapt to IResource.

Specified by:
canAdapt in interface IObjectContributor

contributeObjectActionIdOverrides

public void contributeObjectActionIdOverrides(java.util.List actionIdOverrides)
Description copied from interface: IObjectActionContributor
Contribute to the list the action identifiers from other contributions that this contribution wants to override. Actions of these identifiers will not be contributed.

Specified by:
contributeObjectActionIdOverrides in interface IObjectActionContributor

contributeObjectActions

public boolean contributeObjectActions(org.eclipse.ui.IWorkbenchPart part,
                                       org.eclipse.jface.action.IMenuManager menu,
                                       org.eclipse.jface.viewers.ISelectionProvider selProv,
                                       java.util.List actionIdOverrides)
Contributes actions applicable for the current selection.

Specified by:
contributeObjectActions in interface IObjectActionContributor

contributeObjectMenus

public boolean contributeObjectMenus(org.eclipse.jface.action.IMenuManager menu,
                                     org.eclipse.jface.viewers.ISelectionProvider selProv)
Contributes menus applicable for the current selection.

Specified by:
contributeObjectMenus in interface IObjectActionContributor

createActionDescriptor

protected ActionDescriptor createActionDescriptor(org.eclipse.core.runtime.IConfigurationElement element)
Description copied from class: PluginActionBuilder
This factory method returns a new ActionDescriptor for the configuration element. It should be implemented by subclasses.

Specified by:
createActionDescriptor in class PluginActionBuilder

createContribution

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

Overrides:
createContribution in class PluginActionBuilder

isApplicableTo

public boolean isApplicableTo(java.lang.Object object)
Returns true if name filter is not specified for the contribution or the current selection matches the filter.

Specified by:
isApplicableTo in interface IObjectContributor

readConfigElement

private void readConfigElement()
Reads the configuration element and all the children. This creates an action descriptor for every action in the extension.


readElement

protected boolean readElement(org.eclipse.core.runtime.IConfigurationElement element)
Description copied from class: PluginActionBuilder
Implements abstract method to handle the provided XML element in the registry.

Overrides:
readElement in class PluginActionBuilder

testName

private boolean testName(java.lang.Object object)
Returns whether the current selection matches the contribution name filter.