Package org.eclipse.ui
Class PerspectiveAdapter
- java.lang.Object
-
- org.eclipse.ui.PerspectiveAdapter
-
- All Implemented Interfaces:
IPerspectiveListener,IPerspectiveListener2,IPerspectiveListener3,IPerspectiveListener4
public class PerspectiveAdapter extends Object implements IPerspectiveListener4
This adapter class provides default implementations for the methods described by theIPerspectiveListenerinterface and its extension interfaces.Classes that wish to deal with events which occur as perspectives are added, removed, activated and changed, can extend this class and override only the methods which they are interested in.
- Since:
- 3.1
- See Also:
IPerspectiveListener,IPerspectiveListener2,IPerspectiveListener3,IPerspectiveListener4
-
-
Constructor Summary
Constructors Constructor Description PerspectiveAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidperspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective)Notifies this listener that a perspective in the given page has been activated.voidperspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId)Notifies this listener that a perspective has changed in some way (for example, editor area hidden, perspective reset, view show/hide, editor open/close, etc).voidperspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, IWorkbenchPartReference partRef, String changeId)Notifies this listener that a part in the given page's perspective has changed in some way (for example, view show/hide, editor open/close, etc).voidperspectiveClosed(IWorkbenchPage page, IPerspectiveDescriptor perspective)Notifies this listener that a perspective in the given page has been closed.voidperspectiveDeactivated(IWorkbenchPage page, IPerspectiveDescriptor perspective)Notifies this listener that a perspective in the given page has been deactivated.voidperspectiveOpened(IWorkbenchPage page, IPerspectiveDescriptor perspective)Notifies this listener that a perspective in the given page has been opened.voidperspectivePreDeactivate(IWorkbenchPage page, IPerspectiveDescriptor perspective)Notifies this listener that a perspective in the given page is about to be deactivated.voidperspectiveSavedAs(IWorkbenchPage page, IPerspectiveDescriptor oldPerspective, IPerspectiveDescriptor newPerspective)Notifies this listener that a perspective in the given page has been saved as a new perspective with a different perspective descriptor.
-
-
-
Method Detail
-
perspectiveOpened
public void perspectiveOpened(IWorkbenchPage page, IPerspectiveDescriptor perspective)
Description copied from interface:IPerspectiveListener3Notifies this listener that a perspective in the given page has been opened.- Specified by:
perspectiveOpenedin interfaceIPerspectiveListener3- Parameters:
page- the page containing the opened perspectiveperspective- the perspective descriptor that was opened- See Also:
IWorkbenchPage.setPerspective(IPerspectiveDescriptor)
-
perspectiveClosed
public void perspectiveClosed(IWorkbenchPage page, IPerspectiveDescriptor perspective)
Description copied from interface:IPerspectiveListener3Notifies this listener that a perspective in the given page has been closed.- Specified by:
perspectiveClosedin interfaceIPerspectiveListener3- Parameters:
page- the page containing the closed perspectiveperspective- the perspective descriptor that was closed- See Also:
IWorkbenchPage.closePerspective(IPerspectiveDescriptor, boolean, boolean),IWorkbenchPage.closeAllPerspectives(boolean, boolean)
-
perspectiveChanged
public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, IWorkbenchPartReference partRef, String changeId)
Description copied from interface:IPerspectiveListener2Notifies this listener that a part in the given page's perspective has changed in some way (for example, view show/hide, editor open/close, etc).- Specified by:
perspectiveChangedin interfaceIPerspectiveListener2- Parameters:
page- the workbench page containing the perspectiveperspective- the descriptor for the changed perspectivepartRef- the reference to the affected partchangeId- one of theCHANGE_*constants on IWorkbenchPage
-
perspectiveActivated
public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective)
Description copied from interface:IPerspectiveListenerNotifies this listener that a perspective in the given page has been activated.- Specified by:
perspectiveActivatedin interfaceIPerspectiveListener- Parameters:
page- the page containing the activated perspectiveperspective- the perspective descriptor that was activated- See Also:
IWorkbenchPage.setPerspective(org.eclipse.ui.IPerspectiveDescriptor)
-
perspectiveChanged
public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId)
Description copied from interface:IPerspectiveListenerNotifies this listener that a perspective has changed in some way (for example, editor area hidden, perspective reset, view show/hide, editor open/close, etc).- Specified by:
perspectiveChangedin interfaceIPerspectiveListener- Parameters:
page- the page containing the affected perspectiveperspective- the perspective descriptorchangeId- one of theCHANGE_*constants on IWorkbenchPage
-
perspectiveDeactivated
public void perspectiveDeactivated(IWorkbenchPage page, IPerspectiveDescriptor perspective)
Description copied from interface:IPerspectiveListener3Notifies this listener that a perspective in the given page has been deactivated.- Specified by:
perspectiveDeactivatedin interfaceIPerspectiveListener3- Parameters:
page- the page containing the deactivated perspectiveperspective- the perspective descriptor that was deactivated- See Also:
IWorkbenchPage.setPerspective(IPerspectiveDescriptor)
-
perspectiveSavedAs
public void perspectiveSavedAs(IWorkbenchPage page, IPerspectiveDescriptor oldPerspective, IPerspectiveDescriptor newPerspective)
Description copied from interface:IPerspectiveListener3Notifies this listener that a perspective in the given page has been saved as a new perspective with a different perspective descriptor.- Specified by:
perspectiveSavedAsin interfaceIPerspectiveListener3- Parameters:
page- the page containing the saved perspectiveoldPerspective- the old perspective descriptornewPerspective- the new perspective descriptor- See Also:
IWorkbenchPage.savePerspectiveAs(IPerspectiveDescriptor)
-
perspectivePreDeactivate
public void perspectivePreDeactivate(IWorkbenchPage page, IPerspectiveDescriptor perspective)
Notifies this listener that a perspective in the given page is about to be deactivated.
Note: This does not have the ability to veto a perspective deactivation.
- Specified by:
perspectivePreDeactivatein interfaceIPerspectiveListener4- Parameters:
page- the page containing the deactivated perspectiveperspective- the perspective descriptor that was deactivated- Since:
- 3.2
- See Also:
IWorkbenchPage.setPerspective(IPerspectiveDescriptor)
-
-