Package org.eclipse.ui.internal
Class ViewerActionBuilder
java.lang.Object
org.eclipse.ui.internal.registry.RegistryReader
org.eclipse.ui.internal.PluginActionBuilder
org.eclipse.ui.internal.ViewerActionBuilder
This class reads the registry for extensions that plug into 'popupMenus'
extension point and deals only with the 'viewerContribution' elements.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.ui.internal.PluginActionBuilder
PluginActionBuilder.BasicContribution
-
Field Summary
Fields inherited from class org.eclipse.ui.internal.PluginActionBuilder
cache, currentContribution, targetContributionTag, targetID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ActionDescriptor
This factory method returns a new ActionDescriptor for the configuration element.protected PluginActionBuilder.BasicContribution
Factory method to create the helper contribution class that will hold onto the menus and actions contributed.void
dispose()
Dispose of the action builderprotected boolean
readElement
(IConfigurationElement element) Implements abstract method to handle the provided XML element in the registry.boolean
readViewerContributions
(String id, ISelectionProvider prov, IWorkbenchPart part) Reads the contributions for a viewer menu.Methods inherited from class org.eclipse.ui.internal.PluginActionBuilder
contribute, getID, getTargetID, readContributions, setAllowIdeLogging
Methods inherited from class org.eclipse.ui.internal.registry.RegistryReader
getClassValue, getDescription, logError, logMissingAttribute, logMissingElement, logUnknownElement, orderExtensions, readElementChildren, readElements, readExtension, readRegistry
-
Constructor Details
-
ViewerActionBuilder
public ViewerActionBuilder()Basic contstructor
-
-
Method Details
-
createActionDescriptor
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 classPluginActionBuilder
-
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 classPluginActionBuilder
-
dispose
public void dispose()Dispose of the action builder -
readElement
Description copied from class:PluginActionBuilder
Implements abstract method to handle the provided XML element in the registry.- Overrides:
readElement
in classPluginActionBuilder
- Returns:
- true if element was recognized, false if not.
-
readViewerContributions
Reads the contributions for a viewer menu. This method is typically used in conjunction withcontribute
to read and then insert actions for a particular viewer menu.- Parameters:
id
- the menu idprov
- the selection provider for the control containing the menupart
- the part containing the menu.- Returns:
true
if 1 or more items were read.
-