Class PartService
- All Implemented Interfaces:
- IPageChangedListener,- IPartListener,- IPartListener2,- IPartService
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPartListener(IPartListener listener) Adds the given listener for part lifecycle events.voidaddPartListener(IPartListener2 listener) Adds the given listener for part lifecycle events.Returns the active part.Returns the active part reference.voidpageChanged(PageChangedEvent event) Notifies that the selected page has changed.voidpartActivated(IWorkbenchPart part) Notifies this listener that the given part has been activated.voidpartActivated(IWorkbenchPartReference partRef) Notifies this listener that the given part has been activated.voidNotifies this listener that the given part has been brought to the top.voidpartBroughtToTop(IWorkbenchPartReference partRef) Notifies this listener that the given part has been brought to the top.voidpartClosed(IWorkbenchPart part) Notifies this listener that the given part has been closed.voidpartClosed(IWorkbenchPartReference partRef) Notifies this listener that the given part has been closed.voidNotifies this listener that the given part has been deactivated.voidpartDeactivated(IWorkbenchPartReference partRef) Notifies this listener that the given part has been deactivated.voidpartHidden(IWorkbenchPartReference partRef) Notifies this listener that the given part is hidden or obscured by another part.voidpartInputChanged(IWorkbenchPartReference partRef) Notifies this listener that the given part's input was changed.voidpartOpened(IWorkbenchPart part) Notifies this listener that the given part has been opened.voidpartOpened(IWorkbenchPartReference partRef) Notifies this listener that the given part has been opened.voidpartVisible(IWorkbenchPartReference partRef) Notifies this listener that the given part is visible.voidremovePartListener(IPartListener listener) Removes the given part listener.voidremovePartListener(IPartListener2 listener) Removes the given part listener.
- 
Constructor Details- 
PartServicepublic PartService()
 
- 
- 
Method Details- 
addPartListenerDescription 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 interface- IPartService
- Parameters:
- listener- a part listener
- See Also:
 
- 
addPartListenerDescription 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 interface- IPartService
- Parameters:
- listener- a part listener
- See Also:
 
- 
getActivePartDescription copied from interface:IPartServiceReturns the active part.- Specified by:
- getActivePartin interface- IPartService
- Returns:
- the active part, or nullif no part is currently active
 
- 
getActivePartReferenceDescription copied from interface:IPartServiceReturns the active part reference.- Specified by:
- getActivePartReferencein interface- IPartService
- Returns:
- the active part reference, or nullif no part is currently active
 
- 
removePartListenerDescription copied from interface:IPartServiceRemoves the given part listener. Has no effect if an identical listener is not registered.- Specified by:
- removePartListenerin interface- IPartService
- Parameters:
- listener- a part listener
 
- 
removePartListenerDescription copied from interface:IPartServiceRemoves the given part listener. Has no effect if an identical listener is not registered.- Specified by:
- removePartListenerin interface- IPartService
- Parameters:
- listener- a part listener
 
- 
partActivatedDescription copied from interface:IPartListenerNotifies this listener that the given part has been activated.- Specified by:
- partActivatedin interface- IPartListener
- Parameters:
- part- the part that was activated
- See Also:
 
- 
partBroughtToTopDescription copied from interface:IPartListenerNotifies this listener that the given part has been brought to the top.These events occur when an editor is brought to the top in the editor area, or when a view is brought to the top in a page book with multiple views. They are normally only sent when a part is brought to the top programmatically (via IPerspective.bringToTop). When a part is activated by the user clicking on it, onlypartActivatedis sent.- Specified by:
- partBroughtToTopin interface- IPartListener
- Parameters:
- part- the part that was surfaced
- See Also:
 
- 
partClosedDescription copied from interface:IPartListenerNotifies this listener that the given part has been closed.- Specified by:
- partClosedin interface- IPartListener
- Parameters:
- part- the part that was closed
- See Also:
 
- 
partDeactivatedDescription copied from interface:IPartListenerNotifies this listener that the given part has been deactivated.- Specified by:
- partDeactivatedin interface- IPartListener
- Parameters:
- part- the part that was deactivated
- See Also:
 
- 
partOpenedDescription copied from interface:IPartListenerNotifies this listener that the given part has been opened.- Specified by:
- partOpenedin interface- IPartListener
- Parameters:
- part- the part that was opened
- See Also:
 
- 
partActivatedDescription copied from interface:IPartListener2Notifies this listener that the given part has been activated.- Specified by:
- partActivatedin interface- IPartListener2
- Parameters:
- partRef- the part that was activated
- See Also:
 
- 
partBroughtToTopDescription copied from interface:IPartListener2Notifies this listener that the given part has been brought to the top.These events occur when an editor is brought to the top in the editor area, or when a view is brought to the top in a page book with multiple views. They are normally only sent when a part is brought to the top programmatically (via IPerspective.bringToTop). When a part is activated by the user clicking on it, onlypartActivatedis sent.- Specified by:
- partBroughtToTopin interface- IPartListener2
- Parameters:
- partRef- the part that was surfaced
- See Also:
 
- 
partClosedDescription copied from interface:IPartListener2Notifies this listener that the given part has been closed.Note that if other perspectives in the same page share the view, this notification is not sent. It is only sent when the view is being removed from the page entirely (it is being disposed). - Specified by:
- partClosedin interface- IPartListener2
- Parameters:
- partRef- the part that was closed
- See Also:
 
- 
partDeactivatedDescription copied from interface:IPartListener2Notifies this listener that the given part has been deactivated.- Specified by:
- partDeactivatedin interface- IPartListener2
- Parameters:
- partRef- the part that was deactivated
- See Also:
 
- 
partOpenedDescription copied from interface:IPartListener2Notifies this listener that the given part has been opened.Note that if other perspectives in the same page share the view, this notification is not sent. It is only sent when the view is being newly opened in the page (it is being created). - Specified by:
- partOpenedin interface- IPartListener2
- Parameters:
- partRef- the part that was opened
- See Also:
 
- 
partHiddenDescription copied from interface:IPartListener2Notifies this listener that the given part is hidden or obscured by another part.- Specified by:
- partHiddenin interface- IPartListener2
- Parameters:
- partRef- the part that is hidden or obscured by another part
 
- 
partVisibleDescription copied from interface:IPartListener2Notifies this listener that the given part is visible.- Specified by:
- partVisiblein interface- IPartListener2
- Parameters:
- partRef- the part that is visible
 
- 
partInputChangedDescription copied from interface:IPartListener2Notifies this listener that the given part's input was changed.- Specified by:
- partInputChangedin interface- IPartListener2
- Parameters:
- partRef- the part whose input was changed
 
- 
pageChangedDescription copied from interface:IPageChangedListenerNotifies that the selected page has changed.- Specified by:
- pageChangedin interface- IPageChangedListener
- Parameters:
- event- event object describing the change
 
 
-