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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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.voiddispose()Dispose of the action builderprotected booleanreadElement(IConfigurationElement element) Implements abstract method to handle the provided XML element in the registry.booleanreadViewerContributions(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, setAllowIdeLoggingMethods 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:PluginActionBuilderThis factory method returns a new ActionDescriptor for the configuration element. It should be implemented by subclasses.- Specified by:
createActionDescriptorin classPluginActionBuilder
-
createContribution
Description copied from class:PluginActionBuilderFactory method to create the helper contribution class that will hold onto the menus and actions contributed.- Overrides:
createContributionin classPluginActionBuilder
-
dispose
public void dispose()Dispose of the action builder -
readElement
Description copied from class:PluginActionBuilderImplements abstract method to handle the provided XML element in the registry.- Overrides:
readElementin 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 withcontributeto 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:
trueif 1 or more items were read.
-