Package org.eclipse.ui.internal
Class ObjectActionContributor
java.lang.Object
org.eclipse.ui.internal.registry.RegistryReader
org.eclipse.ui.internal.PluginActionBuilder
org.eclipse.ui.internal.ObjectActionContributor
- All Implemented Interfaces:
- IAdaptable,- IObjectActionContributor,- IObjectContributor
public class ObjectActionContributor
extends PluginActionBuilder
implements IObjectActionContributor, IAdaptable
This class describes the object contribution element within the popup menu
 action registry.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.ui.internal.PluginActionBuilderPluginActionBuilder.BasicContribution
- 
Field SummaryFields inherited from class org.eclipse.ui.internal.PluginActionBuildercache, currentContribution, targetContributionTag, targetID
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanAdapt()Return whether or not the receiver can adapt to IResource.voidcontributeObjectActionIdOverrides(List actionIdOverrides) Contribute to the list the action identifiers from other contributions that this contribution wants to override.booleancontributeObjectActions(IWorkbenchPart part, IMenuManager menu, ISelectionProvider selProv, List actionIdOverrides) Contributes actions applicable for the current selection.booleancontributeObjectMenus(IMenuManager menu, ISelectionProvider selProv) Contributes menus applicable for the current selection.protected ActionDescriptorThis factory method returns a new ActionDescriptor for the configuration element.protected PluginActionBuilder.BasicContributionFactory method to create the helper contribution class that will hold onto the menus and actions contributed.<T> TgetAdapter(Class<T> adapter) Returns an object which is an instance of the given class associated with this object.Return the object class for this contributor.booleanisApplicableTo(Object object) Returns true if name filter is not specified for the contribution or the current selection matches the filter.protected booleanreadElement(IConfigurationElement element) Implements abstract method to handle the provided XML element in the registry.toString()Debugging helper that will print out the contribution names for this contributor.Methods inherited from class org.eclipse.ui.internal.PluginActionBuildercontribute, getID, getTargetID, readContributions, setAllowIdeLoggingMethods inherited from class org.eclipse.ui.internal.registry.RegistryReadergetClassValue, getDescription, logError, logMissingAttribute, logMissingElement, logUnknownElement, orderExtensions, readElementChildren, readElements, readExtension, readRegistry
- 
Constructor Details- 
ObjectActionContributorThe constructor.- Parameters:
- config- the element
 
 
- 
- 
Method Details- 
canAdaptpublic boolean canAdapt()Description copied from interface:IObjectContributorReturn whether or not the receiver can adapt to IResource.- Specified by:
- canAdaptin interface- IObjectContributor
- Returns:
- boolean
 
- 
getObjectClassReturn the object class for this contributor.- Returns:
- the object class
 
- 
contributeObjectActionIdOverridesDescription copied from interface:IObjectActionContributorContribute 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:
- contributeObjectActionIdOverridesin interface- IObjectActionContributor
 
- 
contributeObjectActionspublic boolean contributeObjectActions(IWorkbenchPart part, IMenuManager menu, ISelectionProvider selProv, List actionIdOverrides) Contributes actions applicable for the current selection.- Specified by:
- contributeObjectActionsin interface- IObjectActionContributor
- Returns:
- trueif any contributions were made, and- falseotherwise.
 
- 
contributeObjectMenusContributes menus applicable for the current selection.- Specified by:
- contributeObjectMenusin interface- IObjectActionContributor
- Returns:
- trueif any contributions were made, and- falseotherwise.
 
- 
createActionDescriptorDescription copied from class:PluginActionBuilderThis factory method returns a new ActionDescriptor for the configuration element. It should be implemented by subclasses.- Specified by:
- createActionDescriptorin class- PluginActionBuilder
 
- 
createContributionDescription copied from class:PluginActionBuilderFactory method to create the helper contribution class that will hold onto the menus and actions contributed.- Overrides:
- createContributionin class- PluginActionBuilder
 
- 
isApplicableToReturns true if name filter is not specified for the contribution or the current selection matches the filter.- Specified by:
- isApplicableToin interface- IObjectContributor
- Parameters:
- object- the object to text
- Returns:
- boolean
 
- 
readElementDescription copied from class:PluginActionBuilderImplements abstract method to handle the provided XML element in the registry.- Overrides:
- readElementin class- PluginActionBuilder
- Returns:
- true if element was recognized, false if not.
 
- 
toStringDebugging helper that will print out the contribution names for this contributor.
- 
getAdapterDescription copied from interface:IAdaptableReturns an object which is an instance of the given class associated with this object. Returnsnullif no such object can be found.Clients may implement this method but should generally call Adapters.adapt(Object, Class, boolean)rather than invoking it directly.- Specified by:
- getAdapterin interface- IAdaptable
- Type Parameters:
- T- the class type
- Parameters:
- adapter- the adapter class to look up
- Returns:
- a object of the given class, or nullif this object does not have an adapter for the given class
 
 
-