org.eclipse.ui
Interface IWorkbenchSite

All Superinterfaces:
IAdaptable
All Known Subinterfaces:
IViewSite, IWorkbenchPartSite

public interface IWorkbenchSite
extends IAdaptable

The common interface between the workbench and its parts, including pages within parts.

This interface is not intended to be implemented or extended by clients.

Since:
2.0
See Also:
IWorkbenchPartSite, org.eclipse.ui.part.IPageSite

Method Summary
 IWorkbenchPage getPage()
          Returns the page containing this workbench site.
 ISelectionProvider getSelectionProvider()
          Returns the selection provider for this workbench site.
 Shell getShell()
          Returns the shell for this workbench site.
 IWorkbenchWindow getWorkbenchWindow()
          Returns the workbench org.eclipse.jface.window containing this workbench site.
 void setSelectionProvider(ISelectionProvider provider)
          Sets the selection provider for this workbench site.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getPage

IWorkbenchPage getPage()
Returns the page containing this workbench site.

Returns:
the page containing this workbench site

getSelectionProvider

ISelectionProvider getSelectionProvider()
Returns the selection provider for this workbench site.

Returns:
the selection provider, or null if none

getShell

Shell getShell()
Returns the shell for this workbench site. Not intended to be called from outside the UI thread. Clients should call IWorkbench.getDisplay() to gain access to the display rather than calling getShell().getDisplay().

For compatibility, this method will not throw an exception if called from outside the UI thread, but the returned Shell may be wrong.

Returns:
the shell for this workbench site

getWorkbenchWindow

IWorkbenchWindow getWorkbenchWindow()
Returns the workbench org.eclipse.jface.window containing this workbench site.

Returns:
the workbench org.eclipse.jface.window containing this workbench site

setSelectionProvider

void setSelectionProvider(ISelectionProvider provider)
Sets the selection provider for this workbench site.

Parameters:
provider - the selection provider, or null to clear it