|
Eclipse Platform Release 3.4 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A part service tracks the creation and activation of parts within a workbench page.
This service can be acquired from your service locator:
IPartService service = (IPartService) getSite().getService(IPartService.class);
IWorkbenchPage
,
IServiceLocator.getService(Class)
Method Summary | |
void |
addPartListener(IPartListener listener)
Adds the given listener for part lifecycle events. |
void |
addPartListener(IPartListener2 listener)
Adds the given listener for part lifecycle events. |
IWorkbenchPart |
getActivePart()
Returns the active part. |
IWorkbenchPartReference |
getActivePartReference()
Returns the active part reference. |
void |
removePartListener(IPartListener listener)
Removes the given part listener. |
void |
removePartListener(IPartListener2 listener)
Removes the given part listener. |
Method Detail |
public void addPartListener(IPartListener 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 part listenerremovePartListener(IPartListener)
public void addPartListener(IPartListener2 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 part listener
see removePartListener(IPartListener2)
public IWorkbenchPart getActivePart()
null
if no part is currently activepublic IWorkbenchPartReference getActivePartReference()
null
if no part
is currently activepublic void removePartListener(IPartListener listener)
listener
- a part listenerpublic void removePartListener(IPartListener2 listener)
listener
- a part 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.