|
|||||||||
| Home >> All >> org >> eclipse >> [ ui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.ui
Interface IWorkbenchPartSite

- All Superinterfaces:
- org.eclipse.core.runtime.IAdaptable, IWorkbenchSite
- All Known Subinterfaces:
- IEditorSite, IViewSite
- public interface IWorkbenchPartSite
- extends IWorkbenchSite
The primary interface between a workbench part and the workbench.
This interface is not intended to be implemented or extended by clients.
| Method Summary | |
java.lang.String |
getId()
Returns the part registry extension id for this workbench site's part. |
IKeyBindingService |
getKeyBindingService()
Returns the key binding service in use. |
java.lang.String |
getPluginId()
Returns the unique identifier of the plug-in that defines this workbench site's part. |
java.lang.String |
getRegisteredName()
Returns the registered name for this workbench site's part. |
void |
registerContextMenu(org.eclipse.jface.action.MenuManager menuManager,
org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Registers a pop-up menu with the default id for extension. |
void |
registerContextMenu(java.lang.String menuId,
org.eclipse.jface.action.MenuManager menuManager,
org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Registers a pop-up menu with a particular id for extension. |
| Methods inherited from interface org.eclipse.ui.IWorkbenchSite |
getPage, getSelectionProvider, getShell, getWorkbenchWindow, setSelectionProvider |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
| Method Detail |
getId
public java.lang.String getId()
- Returns the part registry extension id for this workbench site's part.
The name comes from the
idattribute in the configuration element.
getPluginId
public java.lang.String getPluginId()
- Returns the unique identifier of the plug-in that defines this workbench
site's part.
getRegisteredName
public java.lang.String getRegisteredName()
- Returns the registered name for this workbench site's part.
The name comes from the
nameattribute in the configuration element.
registerContextMenu
public void registerContextMenu(java.lang.String menuId, org.eclipse.jface.action.MenuManager menuManager, org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
- Registers a pop-up menu with a particular id for extension.
This method should only be called if the target part has more
than one context menu to register.
For a detailed description of context menu registration see
registerContextMenu(MenuManager, ISelectionProvider);
registerContextMenu
public void registerContextMenu(org.eclipse.jface.action.MenuManager menuManager, org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
- Registers a pop-up menu with the default id for extension.
The default id is defined as the part id.
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.
- If the target part has only one context menu it should be registered
with
id == part id. This can be done easily by callingregisterContextMenu(MenuManager, ISelectionProvider).- If the target part has more than one context menu a unique id should be defined for each. Prefix each menu id with the part id and publish these ids within the javadoc for the target part. Register each menu at runtime by calling
registerContextMenu(String, MenuManager, ISelectionProvider). - If the target part has more than one context menu a unique id should be defined for each. Prefix each menu id with the part id and publish these ids within the javadoc for the target part. Register each menu at runtime by calling
Any pop-up menu which is registered with the workbench should also define a
GroupMarkerin the registered menu with idIWorkbenchActionConstants.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. - If the target part has only one context menu it should be registered
with
getKeyBindingService
public IKeyBindingService getKeyBindingService()
- Returns the key binding service in use.
The part will access this service to register all of its actions, to set the active scope.
- Since:
- 2.1
|
|||||||||
| Home >> All >> org >> eclipse >> [ ui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC