<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<meta name="GENERATOR" content="Mozilla/4.5 [en] (Win98; I) [Netscape]"> | |
<meta name="Author" content="Build"> | |
<title>Eclipse Workbench Extension Point: Creation Wizards</title> | |
</head> | |
<body link="#0000FF" vlink="#800080"> | |
<center> | |
<h1> | |
Creation Wizards</h1></center> | |
<b><i>Identifier: </i></b>org.eclipse.ui.newWizards | |
<p><b><i>Description: </i></b>This extension point is used to register | |
resource creation wizard extensions. Creation wizards appear as choices | |
within the "New Dialog", and are typically used to create new projects, | |
folders and files. | |
<p>In the "New Dialog", wizards are organized into categories which usually | |
reflect a particular problem domain. For instance, a Java oriented | |
plugin may define a category called "Java" which is appropriate for "Class" | |
or "Package" creation wizards. The categories defined by one plug-in | |
can be referenced by other plug-ins using the | |
<tt>category</tt> attribute. | |
Uncategorized wizards, as well as wizards with invalid category paths, | |
will end up in an "Other" category. | |
<p>Wizards may optionally specify a description subelement whose body should | |
contain short text about the wizard. | |
<p><b><i>Configuration Markup:</i></b> | |
<p><tt> <!ELEMENT category EMPTY></tt> | |
<br><tt> <!ATTLIST category</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> name | |
CDATA #REQUIRED</tt> | |
<br><tt> parentCategory CDATA #IMPLIED</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>id -</b> a unique name that can be used to identify this category</li> | |
<li> | |
<b>name</b> - a translatable name of the category that will be used in | |
the dialog box</li> | |
<li> | |
<b>parentCategory</b> - a path to another category if this category should | |
be added as a child</li> | |
</ul> | |
<tt> <!ELEMENT wizard (description)?></tt> | |
<br><tt> <!ATTLIST wizard</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> name | |
CDATA #REQUIRED</tt> | |
<br><tt> icon | |
CDATA #IMPLIED</tt> | |
<br><tt> category | |
CDATA #IMPLIED</tt> | |
<br><tt> class | |
CDATA #REQUIRED</tt> | |
<br><tt> project | |
(true | false) #IMPLIED</tt> | |
<br><tt> finalPerspective | |
CDATA #OPTIONAL</tt> | |
<br><tt> ></tt> | |
<br><tt> <!ELEMENT description (#PCDATA)></tt> | |
<ul> | |
<li> | |
<b>id</b> - a unique name that can be used to identify this wizard</li> | |
<li> | |
<b>name</b> - a translatable name for the wizard that will be used in the | |
dialog box</li> | |
<li> | |
<b>category</b> - a slash-delimited path ('/') of category IDs. Each token | |
in the path must represent a valid category ID previously defined by this | |
or some other plug-in. If omitted, the wizard will be added to the "Other" | |
category.</li> | |
<li> | |
<b>icon</b> - a relative path of the icon that will be used together with | |
the name to represent the wizard as one of the choices in the creation | |
dialog box.</li> | |
<li> | |
<b>class</b> - a fully qualified name of the Java class implementing <tt>org.eclipse.ui.INewWizard</tt>.</li> | |
<li> | |
<b>project</b> - an optional attribute indicating the wizard will create an IProject resource. Also cause the wizard to | |
appear as a choice within the "New Project Dialog".</li> | |
<li> | |
<b>finalPerspective</b> - an optional attribute which identifies a perspective to activate when IProject resource creation | |
is finished. For more information, see API Information below.</li> | |
<li> | |
<b>description</b> - an optional subelement whose body contains a short | |
text describing what the wizard will do when started.</li> | |
</ul> | |
<tt> <!ELEMENT selection EMPTY></tt> | |
<br><tt> <!ATTLIST selection</tt> | |
<br><tt><font color="#000000"> class | |
CDATA #REQUIRED</font></tt> | |
<br><tt> name CDATA #OPTIONAL</tt> | |
<br><tt> ></tt> | |
<ul> | |
<li> | |
<b>class</b> - a fully qualified class name. If each object in the | |
workbench selection implements this interface the selection will be passed | |
to the wizard. Otherwise, an empty selection is passed.</li> | |
<li> | |
<b>name</b> - an optional name filter. Each object in the workbench | |
selection must match the name filter to be passed to the wizard.</li> | |
</ul> | |
<b><i>Examples:</i></b> | |
<p>Following is an example of creation wizard configuration: | |
<p><tt> <extension point="org.eclipse.ui.newWizards"></tt> | |
<br><tt> <category</tt> | |
<br><tt> id="com.xyz.XYZ"</tt> | |
<br><tt> name="XYZ Wizards"></tt> | |
<br><tt> </category></tt> | |
<br><tt> <category</tt> | |
<br><tt> id="com.xyz.XYZ.Web"</tt> | |
<br><tt> name="Web Wizards"</tt> | |
<br><tt> parentCategory="com.xyz.XYZ"></tt> | |
<br><tt> </category></tt> | |
<br><tt> <wizard</tt> | |
<br><tt> id="com.xyz.wizard1"</tt> | |
<br><tt> name="XYZ | |
artifact"</tt> | |
<br><tt> category="com.xyz.XYZ/com.xyz.XYZ.Web"</tt> | |
<br><tt> icon="./icons/XYZwizard1.gif"</tt> | |
<br><tt> class="com.xyz.XYZWizard1"></tt> | |
<br><tt> <description></tt> | |
<br><tt> | |
Create a simple XYZ artifact and set initial content</tt> | |
<br><tt> </description></tt> | |
<br><tt> </wizard></tt> | |
<br><tt> </extension></tt> | |
<p><b><i>API Information</i>: </b>The value of the <tt>class</tt> attribute | |
must represent a class that implements <tt>org.eclipse.ui.INewWizard</tt>. | |
If the wizard is created from within the New Wizard it will be inserted | |
into the existing wizard. If the wizard is launched as a shortcut | |
(from the File New menu or a toolbar button) it will appear standalone | |
as a separate dialog box. | |
<p>The <tt>finalPerspective</tt> attribute identifies a perspective to activate when IProject resource creation | |
is finished within the wizard class. The activation of this perspective should be interpreted according to the | |
workbench preference defined by IWorkbenchPreferenceConstants.PROJECT_OPEN_NEW_PERSPECTIVE. This may mean | |
"open in a new window", "open in the current window", "replace the current perspective", or "do nothing". | |
This is only a hint, but developers are encouraged to read and activate the hint, or they can call the api | |
BasicNewProjectResourceWizard#updatePerspective(IConfigurationElement) which will do the work for them. | |
<p><b><i>Supplied Implementation: </i></b>The workbench comes with wizards | |
for creating empty resources of the following types: project, folder and | |
file. These wizards are registered using the same mechanism as described | |
above. Additional wizards may also appear, subject to particular platform | |
installation. | |
<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation 2000, 2001" BORDER=0 height=12 width=195></a> | |
</body> | |
</html> |