Package org.eclipse.ui.internal
Class PluginActionBuilder.BasicContribution
java.lang.Object
org.eclipse.ui.internal.PluginActionBuilder.BasicContribution
- Enclosing class:
- PluginActionBuilder
Helper class to collect the menus and actions defined within a contribution
 element.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ArrayList<ActionDescriptor> protected ArrayList<IConfigurationElement> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAction(ActionDescriptor desc) Add an action.protected voidaddGroup(IContributionManager mgr, String name) Adds a group to a contribution manager.voidaddMenu(IConfigurationElement element) Add a menu.voidcontribute(IMenuManager menu, boolean menuAppendIfMissing, IToolBarManager toolbar, boolean toolAppendIfMissing) Contributes submenus and/or actions into the provided menu and tool bar managers.protected voidcontributeGroupMarker(IMenuManager menu, IConfigurationElement element) Creates a named menu group marker from the information in the configuration element.protected voidcontributeMenu(IConfigurationElement menuElement, IMenuManager mng, boolean appendIfMissing) Creates a menu from the information in the menu configuration element and adds it into the provided menu manager.protected voidcontributeMenuAction(ActionDescriptor ad, IMenuManager menu, boolean appendIfMissing) Contributes action from action descriptor into the provided menu manager.protected voidcontributeSeparator(IMenuManager menu, IConfigurationElement element) Creates a named menu separator from the information in the configuration element.protected voidcontributeToolbarAction(ActionDescriptor ad, IToolBarManager toolbar, boolean appendIfMissing) Contributes action from the action descriptor into the provided tool bar manager.voiddispose()Disposes this contribution.protected voidDisposes the actions.protected voidinsertAfter(IContributionManager mgr, String refId, IContributionItem item) Inserts a contribution item after another named contribution item.protected voidinsertAfter(IContributionManager mgr, String refId, ActionDescriptor desc) Inserts an action after another named contribution item.protected voidinsertMenuGroup(IMenuManager menu, AbstractGroupMarker marker) Inserts the separator or group marker into the menu.
- 
Field Details
- 
actions
 
- 
Constructor Details- 
BasicContributionprotected BasicContribution()
 
- 
- 
Method Details- 
addMenuAdd a menu.- Parameters:
- element- the element to base the menu on
 
- 
addActionAdd an action.- Parameters:
- desc- the descriptor
 
- 
contributepublic void contribute(IMenuManager menu, boolean menuAppendIfMissing, IToolBarManager toolbar, boolean toolAppendIfMissing) Contributes submenus and/or actions into the provided menu and tool bar managers. The elements added are filtered based on activity enablement.- Parameters:
- menu- the menu to contribute to
- menuAppendIfMissing- whether to append missing groups to menus
- toolbar- the toolbar to contribute to
- toolAppendIfMissing- whether to append missing groups to toolbars
 
- 
contributeMenuprotected void contributeMenu(IConfigurationElement menuElement, IMenuManager mng, boolean appendIfMissing) Creates a menu from the information in the menu configuration element and adds it into the provided menu manager. If 'appendIfMissing' is true, and menu path slot is not found, it will be created and menu will be added into it. Otherwise, add operation will fail.
- 
contributeMenuActionprotected void contributeMenuAction(ActionDescriptor ad, IMenuManager menu, boolean appendIfMissing) Contributes action from action descriptor into the provided menu manager.
- 
contributeSeparatorCreates a named menu separator from the information in the configuration element. If the separator already exists do not create a second.
- 
contributeGroupMarkerCreates a named menu group marker from the information in the configuration element. If the marker already exists do not create a second.
- 
contributeToolbarActionprotected void contributeToolbarAction(ActionDescriptor ad, IToolBarManager toolbar, boolean appendIfMissing) Contributes action from the action descriptor into the provided tool bar manager.
- 
insertMenuGroupInserts the separator or group marker into the menu. Subclasses may override.
- 
insertAfterInserts an action after another named contribution item. Subclasses may override.
- 
insertAfterInserts a contribution item after another named contribution item. Subclasses may override.
- 
addGroupAdds a group to a contribution manager. Subclasses may override.
- 
disposepublic void dispose()Disposes this contribution.- Since:
- 3.1
 
- 
disposeActionsprotected void disposeActions()Disposes the actions.- Since:
- 3.1
 
 
-