|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IPartService
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 |
|---|
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)void addPartListener(IPartListener2 listener)
As of 3.5, the IPartListener2 can also implement IPageChangedListener to be notified about any parts that implement IPageChangeProvider and post PageChangedEvents.
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(IPartListener2),
IPageChangeProvider,
IPageChangedListenerIWorkbenchPart getActivePart()
null if no part is currently activeIWorkbenchPartReference getActivePartReference()
null if no part
is currently activevoid removePartListener(IPartListener listener)
listener - a part listenervoid removePartListener(IPartListener2 listener)
listener - a part listener
|
Eclipse Platform Release 3.6 |
|||||||||
| 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, 2010. All rights reserved.