public interface IWorkbenchPartSite extends IWorkbenchSite
This interface is not intended to be implemented or extended by clients.
Modifier and Type | Method and Description |
---|---|
String |
getId()
Returns the part registry extension id for this workbench site's part.
|
IKeyBindingService |
getKeyBindingService()
Deprecated.
Use
IServiceLocator.getService(Class) instead. |
IWorkbenchPart |
getPart()
Returns the part associated with this site
|
String |
getPluginId()
Returns the unique identifier of the plug-in that defines this workbench
site's part.
|
String |
getRegisteredName()
Returns the registered name for this workbench site's part.
|
void |
registerContextMenu(MenuManager menuManager,
ISelectionProvider selectionProvider)
Registers a pop-up menu with the default id for extension.
|
void |
registerContextMenu(String menuId,
MenuManager menuManager,
ISelectionProvider selectionProvider)
Registers a pop-up menu with a particular id for extension.
|
getPage, getSelectionProvider, getShell, getWorkbenchWindow, setSelectionProvider
getAdapter
getService, hasService
String getId()
The name comes from the id
attribute in the configuration
element.
String getPluginId()
String getRegisteredName()
The name comes from the name
attribute in the configuration
element.
void registerContextMenu(String menuId, MenuManager menuManager, ISelectionProvider selectionProvider)
For a detailed description of context menu registration see
registerContextMenu(MenuManager, ISelectionProvider);
menuId
- the menu idmenuManager
- the menu managerselectionProvider
- the selection providervoid registerContextMenu(MenuManager menuManager, ISelectionProvider selectionProvider)
Within the workbench one plug-in may extend the pop-up menus for a view
or editor within another plug-in. In order to be eligible for extension,
the target part must publish each menu by calling registerContextMenu
.
Once this has been done the workbench will automatically insert any action
extensions which exist.
A menu id must be provided for each registered menu. For consistency across parts the following strategy should be adopted by all part implementors.
id == part id
. This can be done easily by calling
registerContextMenu(MenuManager, ISelectionProvider)
.
registerContextMenu(String, MenuManager,
ISelectionProvider)
.
Any pop-up menu which is registered with the workbench should also define a
GroupMarker
in the registered menu with id
IWorkbenchActionConstants.MB_ADDITIONS
. Other plug-ins will use this
group as a reference point for insertion. The marker should be defined at an
appropriate location within the menu for insertion.
menuManager
- the menu managerselectionProvider
- the selection provider@Deprecated IKeyBindingService getKeyBindingService()
IServiceLocator.getService(Class)
instead.The part will access this service to register all of its actions, to set the active scope.
IContextService
,
IHandlerService
IWorkbenchPart getPart()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.