Package org.eclipse.ui.internal
Class PerspectiveTracker
java.lang.Object
org.eclipse.ui.PerspectiveAdapter
org.eclipse.ui.internal.PerspectiveTracker
- All Implemented Interfaces:
- IPageListener,- IPerspectiveListener,- IPerspectiveListener2,- IPerspectiveListener3,- IPerspectiveListener4
Utility class for tracking the active perspective in a window.
- Since:
- 3.1
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedPerspectiveTracker(IWorkbenchWindow window) Creates a perspective tracker for the given window.PerspectiveTracker(IWorkbenchWindow window, IAction action) Creates a perspective tracker for the given window which will enable the given action only when there is an active perspective.
- 
Method SummaryModifier and TypeMethodDescriptionvoiddispose()Disposes the tracker.voidpageActivated(IWorkbenchPage page) Notifies this listener that the given page has been activated.voidpageClosed(IWorkbenchPage page) Notifies this listener that the given page has been closed.voidpageOpened(IWorkbenchPage page) Notifies this listener that the given page has been opened.voidperspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) Notifies this listener that a perspective in the given page has been activated.protected voidupdate(IPerspectiveDescriptor persp) Performs some function based on the active perspective in the window.Methods inherited from class org.eclipse.ui.PerspectiveAdapterperspectiveChanged, perspectiveChanged, perspectiveClosed, perspectiveDeactivated, perspectiveOpened, perspectivePreDeactivate, perspectiveSavedAs
- 
Constructor Details- 
PerspectiveTrackerCreates a perspective tracker for the given window. Subclasses should overrideupdate(IPerspectiveDescriptor)to get notified of perspective changes.- Parameters:
- window- the window to track
 
- 
PerspectiveTrackerCreates a perspective tracker for the given window which will enable the given action only when there is an active perspective.- Parameters:
- window- the window to track
- action- the action to enable or disable
 
 
- 
- 
Method Details- 
disposepublic void dispose()Disposes the tracker.
- 
pageActivatedDescription copied from interface:IPageListenerNotifies this listener that the given page has been activated.- Specified by:
- pageActivatedin interface- IPageListener
- Parameters:
- page- the page that was activated
- See Also:
 
- 
pageClosedDescription copied from interface:IPageListenerNotifies this listener that the given page has been closed.- Specified by:
- pageClosedin interface- IPageListener
- Parameters:
- page- the page that was closed
- See Also:
 
- 
pageOpenedDescription copied from interface:IPageListenerNotifies this listener that the given page has been opened.- Specified by:
- pageOpenedin interface- IPageListener
- Parameters:
- page- the page that was opened
- See Also:
 
- 
perspectiveActivatedDescription copied from interface:IPerspectiveListenerNotifies this listener that a perspective in the given page has been activated.- Specified by:
- perspectiveActivatedin interface- IPerspectiveListener
- Overrides:
- perspectiveActivatedin class- PerspectiveAdapter
- Parameters:
- page- the page containing the activated perspective
- perspective- the perspective descriptor that was activated
- See Also:
 
- 
updatePerforms some function based on the active perspective in the window.The default implementation enables the action (if given) if there is an active perspective, otherwise it disables it. Subclasses may override or extend. - Parameters:
- persp- the active perspective in the window, or- nullif none
 
 
-