|
Eclipse Platform Release 3.4 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A page service tracks the page and perspective lifecycle events within a workbench window.
This service can be acquired from your service locator:
IPageService service = (IPageService) getSite().getService(IPageService.class);
IWorkbenchWindow,
IPageListener,
IPerspectiveListener,
IServiceLocator.getService(Class)| Method Summary | |
void |
addPageListener(IPageListener listener)
Adds the given listener for page lifecycle events. |
void |
addPerspectiveListener(IPerspectiveListener listener)
Adds the given listener for a page's perspective lifecycle events. |
IWorkbenchPage |
getActivePage()
Returns the active page. |
void |
removePageListener(IPageListener listener)
Removes the given page listener. |
void |
removePerspectiveListener(IPerspectiveListener listener)
Removes the given page's perspective listener. |
| Method Detail |
public void addPageListener(IPageListener listener)
Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.
listener - a page listenerremovePageListener(IPageListener)public void addPerspectiveListener(IPerspectiveListener listener)
Note: listeners should be removed when no longer necessary. If not, they will be removed when the IServiceLocator used to acquire this service is disposed.
listener - a perspective listenerremovePerspectiveListener(IPerspectiveListener)public IWorkbenchPage getActivePage()
null if no page is currently activepublic void removePageListener(IPageListener listener)
listener - a page listenerpublic void removePerspectiveListener(IPerspectiveListener listener)
listener - a perspective listener
|
Eclipse Platform Release 3.4 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.