Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui
Interface IWorkbenchPartSite

All Superinterfaces:
IAdaptable, IServiceLocator, IShellProvider, IWorkbenchSite
All Known Subinterfaces:
IEditorSite, IViewSite
All Known Implementing Classes:
MultiPageEditorSite

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.

Restriction:
This interface is not intended to be implemented by clients.

Method Summary
  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.
 
Methods inherited from interface org.eclipse.ui. IWorkbenchSite
getPage, getSelectionProvider, getShell, getWorkbenchWindow, setSelectionProvider
 
Methods inherited from interface org.eclipse.core.runtime. IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.ui.services. IServiceLocator
getService, hasService
 

Method Detail

getId

String getId()
Returns the part registry extension id for this workbench site's part.

The name comes from the id attribute in the configuration element.

Returns:
the registry extension id

getPluginId

String getPluginId()
Returns the unique identifier of the plug-in that defines this workbench site's part.

Returns:
the unique identifier of the declaring plug-in

getRegisteredName

String getRegisteredName()
Returns the registered name for this workbench site's part.

The name comes from the name attribute in the configuration element.

Returns:
the part name

registerContextMenu

void registerContextMenu(
String menuId,
                         
MenuManager menuManager,
                         
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);

Parameters:
menuId - the menu id
menuManager - the menu manager
selectionProvider - the selection provider

registerContextMenu

void registerContextMenu(
MenuManager menuManager,
                         
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.

  1. If the target part has only one context menu it should be registered with id == part id. This can be done easily by calling registerContextMenu(MenuManager, ISelectionProvider).
  2. 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).

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.

Parameters:
menuManager - the menu manager
selectionProvider - the selection provider

getKeyBindingService

IKeyBindingService getKeyBindingService()
Deprecated. Use IServiceLocator.getService(Class) instead.

Returns the key binding service in use.

The part will access this service to register all of its actions, to set the active scope.

Returns:
the key binding service in use
Since:
2.1
See Also:
IContextService, IHandlerService

getPart

IWorkbenchPart getPart()
Returns the part associated with this site

Returns:
the part associated with this site
Since:
3.1

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire