001: /*******************************************************************************
002: * Copyright (c) 2004, 2006 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.ui;
011:
012: /**
013: * This adapter class provides default implementations for the methods described
014: * by the <code>IPerspectiveListener</code> interface and its extension
015: * interfaces.
016: * <p>
017: * Classes that wish to deal with events which occur as perspectives are added,
018: * removed, activated and changed, can extend this class and override only the
019: * methods which they are interested in.
020: * </p>
021: *
022: * @see org.eclipse.ui.IPerspectiveListener
023: * @see org.eclipse.ui.IPerspectiveListener2
024: * @see org.eclipse.ui.IPerspectiveListener3
025: * @see org.eclipse.ui.IPerspectiveListener4
026: * @since 3.1
027: */
028: public class PerspectiveAdapter implements IPerspectiveListener4 {
029:
030: /*
031: * (non-Javadoc)
032: *
033: * @see org.eclipse.ui.IPerspectiveListener3#perspectiveOpened(org.eclipse.ui.IWorkbenchPage,
034: * org.eclipse.ui.IPerspectiveDescriptor)
035: */
036: public void perspectiveOpened(IWorkbenchPage page,
037: IPerspectiveDescriptor perspective) {
038: // do nothing
039: }
040:
041: /*
042: * (non-Javadoc)
043: *
044: * @see org.eclipse.ui.IPerspectiveListener3#perspectiveClosed(org.eclipse.ui.IWorkbenchPage,
045: * org.eclipse.ui.IPerspectiveDescriptor)
046: */
047: public void perspectiveClosed(IWorkbenchPage page,
048: IPerspectiveDescriptor perspective) {
049: // do nothing
050: }
051:
052: /*
053: * (non-Javadoc)
054: *
055: * @see org.eclipse.ui.IPerspectiveListener2#perspectiveChanged(org.eclipse.ui.IWorkbenchPage,
056: * org.eclipse.ui.IPerspectiveDescriptor,
057: * org.eclipse.ui.IWorkbenchPartReference, java.lang.String)
058: */
059: public void perspectiveChanged(IWorkbenchPage page,
060: IPerspectiveDescriptor perspective,
061: IWorkbenchPartReference partRef, String changeId) {
062: // do nothing
063: }
064:
065: /*
066: * (non-Javadoc)
067: *
068: * @see org.eclipse.ui.IPerspectiveListener#perspectiveActivated(org.eclipse.ui.IWorkbenchPage,
069: * org.eclipse.ui.IPerspectiveDescriptor)
070: */
071: public void perspectiveActivated(IWorkbenchPage page,
072: IPerspectiveDescriptor perspective) {
073: // do nothing
074: }
075:
076: /*
077: * (non-Javadoc)
078: *
079: * @see org.eclipse.ui.IPerspectiveListener#perspectiveChanged(org.eclipse.ui.IWorkbenchPage,
080: * org.eclipse.ui.IPerspectiveDescriptor, java.lang.String)
081: */
082: public void perspectiveChanged(IWorkbenchPage page,
083: IPerspectiveDescriptor perspective, String changeId) {
084: // do nothing
085: }
086:
087: /*
088: * (non-Javadoc)
089: *
090: * @see org.eclipse.ui.IPerspectiveListener3#perspectiveDeactivated(org.eclipse.ui.IWorkbenchPage,
091: * org.eclipse.ui.IPerspectiveDescriptor)
092: */
093: public void perspectiveDeactivated(IWorkbenchPage page,
094: IPerspectiveDescriptor perspective) {
095: // do nothing
096: }
097:
098: /*
099: * (non-Javadoc)
100: *
101: * @see org.eclipse.ui.IPerspectiveListener3#perspectiveSavedAs(org.eclipse.ui.IWorkbenchPage,
102: * org.eclipse.ui.IPerspectiveDescriptor,
103: * org.eclipse.ui.IPerspectiveDescriptor)
104: */
105: public void perspectiveSavedAs(IWorkbenchPage page,
106: IPerspectiveDescriptor oldPerspective,
107: IPerspectiveDescriptor newPerspective) {
108: // do nothing
109: }
110:
111: /**
112: * {@inheritDoc}
113: * @since 3.2
114: */
115: public void perspectivePreDeactivate(IWorkbenchPage page,
116: IPerspectiveDescriptor perspective) {
117: // do nothing
118: }
119: }
|