Package org.eclipse.ui.internal
Class PluginActionSetBuilder
java.lang.Object
org.eclipse.ui.internal.registry.RegistryReader
org.eclipse.ui.internal.PluginActionBuilder
org.eclipse.ui.internal.PluginActionSetBuilder
This builder reads the actions for an action set from the registry.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Used by the workbench window extension handler to unhook action sets from their associated window.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 TypeMethodDescriptionvoid
buildMenuAndToolBarStructure
(PluginActionSet set, IWorkbenchWindow window) Read the actions within a config element.protected 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.static IContributionItem
findInsertionPoint
(String startId, String sortId, IContributionManager mgr, boolean startVsEnd) Returns the insertion point for a new contribution item.protected void
protected void
readActionExtensions
(PluginActionSet set, IWorkbenchWindow window) Read the actions within a config element.protected void
removeActionExtensions
(PluginActionSet set, IWorkbenchWindow window) Remove the given action set from the window.Methods inherited from class org.eclipse.ui.internal.PluginActionBuilder
contribute, getID, getTargetID, readContributions, readElement, setAllowIdeLogging
Methods inherited from class org.eclipse.ui.internal.registry.RegistryReader
getClassValue, getDescription, logError, logMissingAttribute, logMissingElement, logUnknownElement, orderExtensions, readElementChildren, readElements, readExtension, readRegistry
-
Constructor Details
-
PluginActionSetBuilder
public PluginActionSetBuilder()Constructs a new builder.
-
-
Method Details
-
buildMenuAndToolBarStructure
Read the actions within a config element. Called by customize perspective- Parameters:
set
- the action setwindow
- the window to contribute to
-
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
-
findInsertionPoint
public static IContributionItem findInsertionPoint(String startId, String sortId, IContributionManager mgr, boolean startVsEnd) Returns the insertion point for a new contribution item. Clients should use this item as a reference point for insertAfter.- Parameters:
startId
- the reference id for insertionsortId
- the sorting id for the insertion. If null then the item will be inserted at the end of all action sets.mgr
- the target menu manager.startVsEnd
- iftrue
the items are added at the start of action with the same id; else they are added to the end- Returns:
- the insertion point, or null if not found.
-
processAdjunctContributions
protected void processAdjunctContributions() -
readActionExtensions
Read the actions within a config element. -
removeActionExtensions
Remove the given action set from the window.- Parameters:
set
- the set to removewindow
- the window to remove from
-