Provides context menu items and
IActionBars contributions for a particular abstract
viewer. The interface matches that of
ActionGroup and may be used in the same manner.
Clients must call
NavigatorActionService.prepareMenuForPlatformContributions(MenuManagerISelectionProviderboolean) when using this class to allow object or viewer contributions. The
org.eclipse.ui.navigator.viewer/viewer/popupMenu element may override whether platform
contributions are allowed to the menu with its allowsPlatformContributions attribute.
"Platform Contributions" are menu items that are added through the org.eclipse.ui.popupMenus
extension point.
A
CommonActionProvider has opportunities to contribute to the context menu and
org.eclipse.ui.IActionBars whenever the selection in the viewer changes. Action Providers
are selected based on the enablement expressions of their associated content extension or their
own enablement expression if it is declared as a top-level <actionProvider /> element (of
the org.eclipse.ui.navigator.navigatorContent extension point). See the schema
documentation of org.eclipse.ui.navigator.navigatorContent for more information on how to
specify an Action Provider.
Clients that reuse this service outside of an instance of
CommonNavigator must be sure
that {
NavigatorActionService.fillActionBars(IActionBars) is called whenever the selection changes. The
retargetable actions for each selection could change, based on who contributed the items.
since: 3.2 |