1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.ui; 12 13 import org.eclipse.core.runtime.IAdaptable; 14 import org.eclipse.jface.preference.IPreferencePage; 15 import org.eclipse.ui.dialogs.PropertyDialogAction; 16 17 /** 18 * Interface for workbench property pages. Property pages generally show up in 19 * the workbench's Property Pages dialog. 20 * <p> 21 * Clients should implement this interface and include the name of their class 22 * in an extension contributed to the workbench's property page extension point 23 * (named <code>"org.eclipse.ui.propertyPages"</code>). 24 * For example, the plug-in's XML markup might contain: 25 * <pre> 26 * <extension point="org.eclipse.ui.propertyPages"> 27 * <page id="com.example.myplugin.props" 28 * name="Knobs" 29 * objectClass="org.eclipse.core.resources.IResource" 30 * class="com.example.myplugin.MyPropertyPage" /> 31 * </extension> 32 * </pre> 33 * </p> 34 */ 35 public interface IWorkbenchPropertyPage extends IPreferencePage { 36 /** 37 * Returns the object that owns the properties shown in this page. 38 * 39 * @return the object that owns the properties shown in this page 40 */ 41 public IAdaptable getElement(); 42 43 /** 44 * Sets the object that owns the properties shown in this page. 45 * The page is expected to store this object and provide it if 46 * <code>getElement</code> is called. 47 * <p> As of Eclipse 3.2 the org.eclipse.ui.propertyPages extension 48 * point now supports non IAdaptable inputs. An input 49 * that is not an IAdaptable will be wrapped in an 50 * IAdaptable by the workbench before it is forwarded 51 * to this method. 52 * </p> 53 * @see PropertyDialogAction 54 * 55 * @param element the object that owns the properties shown in this page 56 */ 57 public void setElement(IAdaptable element); 58 } 59