Package org.eclipse.ui.internal
Class SlavePartService
java.lang.Object
org.eclipse.ui.internal.SlavePartService
- All Implemented Interfaces:
IPartService,IDisposable
A part service which delegates all responsibility to the parent service. The
slave service is only responsible for disposing any locally activated
listeners when it is disposed.
This class is not intended for use outside of the
org.eclipse.ui.workbench plug-in.
- Since:
- 3.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPartListener(IPartListener listener) Adds the given listener for part lifecycle events.voidaddPartListener(IPartListener2 listener) Adds the given listener for part lifecycle events.voiddispose()Disposes of this service.Returns the active part.Returns the active part reference.voidremovePartListener(IPartListener listener) Removes the given part listener.voidremovePartListener(IPartListener2 listener) Removes the given part listener.
-
Constructor Details
-
SlavePartService
Constructs a new instance.- Parameters:
parentPartService- The parent part service for this slave. Nevernull.
-
-
Method Details
-
addPartListener
Description copied from interface:IPartServiceAdds the given listener for part lifecycle events. Has no effect if an identical listener is already registered.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.
- Specified by:
addPartListenerin interfaceIPartService- Parameters:
listener- a part listener- See Also:
-
addPartListener
Description copied from interface:IPartServiceAdds the given listener for part lifecycle events. Has no effect if an identical listener is already registered.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.
- Specified by:
addPartListenerin interfaceIPartService- Parameters:
listener- a part listener- See Also:
-
getActivePart
Description copied from interface:IPartServiceReturns the active part.- Specified by:
getActivePartin interfaceIPartService- Returns:
- the active part, or
nullif no part is currently active
-
getActivePartReference
Description copied from interface:IPartServiceReturns the active part reference.- Specified by:
getActivePartReferencein interfaceIPartService- Returns:
- the active part reference, or
nullif no part is currently active
-
removePartListener
Description copied from interface:IPartServiceRemoves the given part listener. Has no effect if an identical listener is not registered.- Specified by:
removePartListenerin interfaceIPartService- Parameters:
listener- a part listener
-
removePartListener
Description copied from interface:IPartServiceRemoves the given part listener. Has no effect if an identical listener is not registered.- Specified by:
removePartListenerin interfaceIPartService- Parameters:
listener- a part listener
-
dispose
public void dispose()Description copied from interface:IDisposableDisposes of this service. All resources must be freed. All listeners must be detached. Dispose will only be called once during the life cycle of a service.- Specified by:
disposein interfaceIDisposable
-