1 /******************************************************************************* 2 * Copyright (c) 2000, 2003 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Common Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/cpl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.ui.internal; 12 13 14 import org.eclipse.ui.*; 15 16 /** 17 * A perspective service tracks the activation and reset of perspectives within a 18 * workbench page. 19 * <p> 20 * This interface is not intended to be implemented by clients. 21 * </p> 22 * 23 * @see IWorkbenchPage 24 */ 25 public interface IPerspectiveService { 26 /** 27 * Adds the given listener for a page's perspective lifecycle events. 28 * Has no effect if an identical listener is already registered. 29 * 30 * @param listener a perspective listener 31 */ 32 public void addPerspectiveListener(IInternalPerspectiveListener listener); 33 /* 34 * Returns the active perspective descriptor in the active workbench page. 35 * 36 * @return the active perspective descriptor, or <code>null</code> if no perspective is currently active 37 */ 38 public IPerspectiveDescriptor getActivePerspective(); 39 /** 40 * Removes the given page's perspective listener. 41 * Has no affect if an identical listener is not registered. 42 * 43 * @param listener a perspective listener 44 */ 45 public void removePerspectiveListener(IInternalPerspectiveListener listener); 46 } 47