Package org.eclipse.ui.internal
Class PluginActionBuilder
java.lang.Object
org.eclipse.ui.internal.registry.RegistryReader
org.eclipse.ui.internal.PluginActionBuilder
- Direct Known Subclasses:
EditorActionBuilder
,ObjectActionContributor
,PluginActionSetBuilder
,ViewActionBuilder
,ViewerActionBuilder
public abstract class PluginActionBuilder
extends org.eclipse.ui.internal.registry.RegistryReader
This class contains shared functionality for reading action contributions
from plugins into workbench parts (both editors and views).
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Helper class to collect the menus and actions defined within a contribution element. -
Field Summary
Modifier and TypeFieldDescriptionprotected PluginActionBuilder.BasicContribution
protected String
protected String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
contribute
(IMenuManager menu, IToolBarManager toolbar, boolean appendIfMissing) Contributes submenus and/or actions into the provided menu and tool bar managers.protected abstract 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.protected String
getID
(IConfigurationElement element) Returns the id of this contributions.protected String
getTargetID
(IConfigurationElement element) Returns the name of the part ID attribute that is expected in the target extension.protected void
readContributions
(String id, String tag, String extensionPoint) Reads the contributions from the registry for the provided workbench part and the provided extension point ID.protected boolean
readElement
(IConfigurationElement element) Implements abstract method to handle the provided XML element in the registry.static void
setAllowIdeLogging
(boolean b) If set tofalse
, some of the logs that can be caused by use IDE plugins from an RCP app will be ignored.Methods inherited from class org.eclipse.ui.internal.registry.RegistryReader
getClassValue, getDescription, logError, logMissingAttribute, logMissingElement, logUnknownElement, orderExtensions, readElementChildren, readElements, readExtension, readRegistry
-
Field Details
-
targetID
-
targetContributionTag
-
currentContribution
-
cache
-
-
Constructor Details
-
PluginActionBuilder
public PluginActionBuilder()The default constructor.
-
-
Method Details
-
contribute
Contributes submenus and/or actions into the provided menu and tool bar managers.- Parameters:
menu
- the menu to contribute totoolbar
- the toolbar to contribute toappendIfMissing
- append containers if missing
-
createActionDescriptor
This factory method returns a new ActionDescriptor for the configuration element. It should be implemented by subclasses. -
createContribution
Factory method to create the helper contribution class that will hold onto the menus and actions contributed. -
getTargetID
Returns the name of the part ID attribute that is expected in the target extension. -
getID
Returns the id of this contributions. -
readContributions
Reads the contributions from the registry for the provided workbench part and the provided extension point ID. -
readElement
Implements abstract method to handle the provided XML element in the registry.- Specified by:
readElement
in classorg.eclipse.ui.internal.registry.RegistryReader
- Returns:
- true if element was recognized, false if not.
-
setAllowIdeLogging
public static void setAllowIdeLogging(boolean b) If set tofalse
, some of the logs that can be caused by use IDE plugins from an RCP app will be ignored.- Parameters:
b
- Log the errors or not.- Since:
- 3.3
-