## Workbench menu contributions

We've seen several different extension points that contribute to various menus and toolbars in the workbench. How do you know which one to use? The following table summarizes the various menu contributions and their use.

Extension point name | Location of Actions | Details
--- | --- | ---
viewActions | Actions appear in a specific view's local toolbar and local pulldown menu. | Contribute an action class that implements IViewActionDelegate. Specify the id of the contribution and the id of the target view that should show the action. The label and image dictate the appearance of the action in the UI. The path specifies the location relative to the view's menu and toolbar items.
editorActions | Actions are associated with an editor and appear in the workbench menu and/or tool bar. | Contribute an action class that implements IEditorActionDelegate. Specify the id of the contribution and the id of the target editor that causes the action to be shown. The label and image specify the appearance of the action in the UI. Separate menu and toolbar paths specify the existence and location of the contribution in the workbench menu and toolbar.
popupMenus | Actions appear in the popup menu of an editor or view. Actions associated with an object type show up in all popups of views and editors that show the object type. Actions associated with a specific popup menu appear only in that popup menu. | Object contributions specify the type of object for which the action should appear in a popup menu. The action will be shown in all view and editor popups that contain the object type. Provide an action class that implements IObjectActionDelegate. Viewer contributions specify the id of the target popup menu in which the menu item should appear. Provide an action class that implements IEditorActionDelegate or IViewActionDelegate.
actionSets | Actions appear in the workbench main menus and toolbar. Actions are grouped into action sets. All actions in an action set will show up in the workbench menus and toolbars according to the user's selection of action sets and the current perspective shown in the workbench. May be influenced by actionSetPartAssociations (below). | Contribute an action class that implements IWorkbenchWindowActionDelegate or IWorkbenchWindowPulldownDelegate. Specify the name and id of the action set. Enumerate all of the actions that are defined for that action set. For each action, separate menu and toolbar paths specify the existence and location of the contribution in the workbench menu and toolbar.
actionSetPartAssociations | Actions sets are shown only when the specified views or editors are active. This is ignored if the user has customized the current perspective. | Specify an action set by id and followed by one or more parts (by id) that must be active in the current perspective in order to show the action set.
menus | Commands can be placed in all of the locations covered by the 4 main action extension points, plus other trim areas. | The extension point should be used to place commands in menus and toolbars so they can be executed by the user.