java.lang.Object
org.eclipse.ui.internal.registry.RegistryReader
org.eclipse.ui.internal.PluginActionBuilder
org.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.
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ObjectActionContributor
public ObjectActionContributor(org.eclipse.core.runtime.IConfigurationElement config)
- The constructor.
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.