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