|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.PageSite
This implementation of IPageSite
provides a site for a page
within a PageBookView
. Most methods are forwarded to the view's
site.
Constructor Summary | |
---|---|
PageSite(IViewSite parentViewSite)
Creates a new sub view site of the given parent view site. |
Method Summary | |
---|---|
protected void |
dispose()
Disposes of the menu extender contributions. |
IActionBars |
getActionBars()
The PageSite implementation of this IPageSite
method returns the SubActionBars for this site. |
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
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 window containing this workbench site. |
void |
registerContextMenu(String menuID,
MenuManager menuMgr,
ISelectionProvider selProvider)
Registers a pop-up menu with a particular id for extension. |
void |
setSelectionProvider(ISelectionProvider provider)
Sets the selection provider for this workbench site. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PageSite(IViewSite parentViewSite)
parentViewSite
- the parent view siteMethod Detail |
protected void dispose()
public IActionBars getActionBars()
IPageSite
method returns the SubActionBars
for this site.
getActionBars
in interface IPageSite
public IWorkbenchPage getPage()
IWorkbenchSite
getPage
in interface IWorkbenchSite
public ISelectionProvider getSelectionProvider()
IWorkbenchSite
getSelectionProvider
in interface IWorkbenchSite
null
if nonepublic Shell getShell()
IWorkbenchSite
For compatibility, this method will not throw an exception if called from outside the UI thread, but the returned Shell may be wrong.
getShell
in interface IWorkbenchSite
public IWorkbenchWindow getWorkbenchWindow()
IWorkbenchSite
getWorkbenchWindow
in interface IWorkbenchSite
public void registerContextMenu(String menuID, MenuManager menuMgr, ISelectionProvider selProvider)
IPageSite
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 menu must be registered by calling registerContextMenu
.
Once this has been done the workbench will automatically insert any action
extensions which exist.
A unique menu id must be provided for each registered menu. This id should be published in the Javadoc for the page.
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.
registerContextMenu
in interface IPageSite
menuID
- the menu idmenuMgr
- the menu managerselProvider
- the selection providerpublic void setSelectionProvider(ISelectionProvider provider)
IWorkbenchSite
setSelectionProvider
in interface IWorkbenchSite
provider
- the selection provider, or null
to clear itpublic Object getAdapter(Class adapter)
IAdaptable
null
if
no such object can be found.
getAdapter
in interface IAdaptable
adapter
- the adapter class to look up
null
if this object does not
have an adapter for the given class
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.