Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "FAQ How do I add my wizard to the New, Import, or Export menu categories?"
m |
|||
Line 1: | Line 1: | ||
− | Some special kinds of wizards have to be registered with the platform | + | Some special kinds of wizards have to be registered with the platform in your <tt>plugin.xml</tt> file. These wizards are found under the '''File > New''', '''File > Import''', and '''File > Export''' menu actions. These wizards are declared using the <tt>org.eclipse.ui</tt> <tt>newWizards</tt>, <tt>importWizards</tt>, and <tt>exportWizards</tt> extension points, respectively. Once you have declared your wizard with the appropriate extension point, the platform will take care of displaying it in the appropriate places. Following is an example declaration of a new wizard: |
− | in your <tt>plugin.xml</tt> file. These wizards are found under the '''File > New''', | + | |
− | '''File > Import''', and '''File > Export''' menu actions. These | + | |
− | wizards are declared using the <tt>org.eclipse.ui</tt> <tt>newWizards</tt>, | + | |
− | <tt>importWizards</tt>, and <tt>exportWizards</tt> | + | |
− | extension points, respectively. Once you have declared your wizard with the appropriate extension | + | |
− | point, the platform will take care of displaying it in the appropriate places. Following | + | |
− | is an example declaration of a new wizard: | + | |
<pre> | <pre> | ||
<extension | <extension | ||
Line 18: | Line 12: | ||
</pre> | </pre> | ||
+ | This wizard will appear by default under '''File > New > Other...'''. To make the wizard appear under the new-project category, add the attribute <tt>project="true"</tt> to the extension declaration. | ||
− | + | To add your own wizard category, use | |
− | To | + | |
− | |||
<pre> | <pre> | ||
<category | <category | ||
Line 34: | Line 27: | ||
</category> | </category> | ||
</pre> | </pre> | ||
− | |||
== See Also: == | == See Also: == | ||
− | + | *[[FAQ_How_do_I_make_my_wizard_appear_in_the_UI?]] | |
− | [[FAQ_How_do_I_make_my_wizard_appear_in_the_UI | + | |
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font> | <hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font> |
Revision as of 22:39, 29 May 2006
Some special kinds of wizards have to be registered with the platform in your plugin.xml file. These wizards are found under the File > New, File > Import, and File > Export menu actions. These wizards are declared using the org.eclipse.ui newWizards, importWizards, and exportWizards extension points, respectively. Once you have declared your wizard with the appropriate extension point, the platform will take care of displaying it in the appropriate places. Following is an example declaration of a new wizard:
<extension point="org.eclipse.ui.newWizards"> <wizard name="New Addition" class="org.eclipse.faq.examples.AddingWizard" id="org.eclipse.faq.examples.addingWizard"> </wizard> </extension>
This wizard will appear by default under File > New > Other.... To make the wizard appear under the new-project category, add the attribute project="true" to the extension declaration.
To add your own wizard category, use
<category id="org.eclipse.faq.examples.MyWizard" name="FAQ Wizards"> </category> <category id="org.eclipse.faq.examples.WizardSubCategory" name="More Specific FAQ Wizards"> parentCategory="org.eclipse.faq.examples.MyWizard" </category>
See Also:
This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.