blob: 28fc8600ebb95f4387a04de89dcea748c5ebe31b [file] [log] [blame]
<!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.&nbsp; For instance, a Java oriented
plugin may define a category called "Java" which is appropriate for "Class"
or "Package" creation wizards.&nbsp; 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>&nbsp;&nbsp; &lt;!ELEMENT category EMPTY></tt>
<br><tt>&nbsp;&nbsp; &lt;!ATTLIST category</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parentCategory CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp; ></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>&nbsp;&nbsp; &lt;!ELEMENT wizard (description)?></tt>
<br><tt>&nbsp;&nbsp; &lt;!ATTLIST wizard</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; category&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
CDATA #REQUIRED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; project&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(true | false) #IMPLIED</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; finalPerspective&nbsp;&nbsp;
CDATA #OPTIONAL</tt>
<br><tt>&nbsp;&nbsp; ></tt>
<br><tt>&nbsp;&nbsp; &lt;!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>&nbsp;&nbsp; &lt;!ELEMENT selection EMPTY></tt>
<br><tt>&nbsp;&nbsp; &lt;!ATTLIST selection</tt>
<br><tt><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class&nbsp;
CDATA #REQUIRED</font></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name&nbsp;&nbsp; CDATA #OPTIONAL</tt>
<br><tt>&nbsp;&nbsp; ></tt>
<ul>
<li>
<b>class</b> - a fully qualified class name.&nbsp; If each object in the
workbench selection implements this interface the selection will be passed
to the wizard.&nbsp; Otherwise, an empty selection is passed.</li>
<li>
<b>name</b> - an optional name filter.&nbsp; 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>&nbsp;&nbsp; &lt;extension point="org.eclipse.ui.newWizards"></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;category</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="com.xyz.XYZ"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="XYZ Wizards"></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/category></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;category</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="com.xyz.XYZ.Web"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="Web Wizards"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parentCategory="com.xyz.XYZ"></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/category></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;wizard</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id="com.xyz.wizard1"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name="XYZ
artifact"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; category="com.xyz.XYZ/com.xyz.XYZ.Web"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; icon="./icons/XYZwizard1.gif"</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; class="com.xyz.XYZWizard1"></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;description></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Create a simple XYZ artifact and set initial content</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/description></tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/wizard></tt>
<br><tt>&nbsp;&nbsp; &lt;/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.&nbsp; 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>