Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] get the id value from wizard in plugin.xml

Hi,

First of all, you should ask that kind of question on the eclipse.platform.rcp newsgroup (news.eclipse.org, or http://www.eclipse.org/newsportal/thread.php?group=eclipse.platform.rcp).

To answer your question, you should make your com.app.template.ApplicationWizard class implement org.eclipse.core.runtime.IExecutableExtension. Have a look at the Javadoc of the setInitialization(...) method, and you'll easily understand how to retrieve the id of the wizard contribution in the IConfigurationElement you'll receive in parameter... ;-)
However, I'm sure you could probably have something a bit cleaner making to different wizard classes, both deriving and "AbstractApplicationWizard" or something... My 0.02$... :-)

Cheers,
Ben

Anyware Technologies
Benjamin Cabé
Expert Eclipse
benjamin.cabe@xxxxxxxxxxxxxxxx
http://blog.benjamin-cabe.com
Tel : +33(0)5 61 00 06 41
Fax : +33(0)5 61 00 51 46
 
Nouvelle adresse

Anyware Technologies
Lake Park
ZAC de l'Hers - Allée du Lac
BP 87216
31672 Labège Cedex
France
www.anyware-tech.com


Lavoropde Ww a écrit :
Hi all,

I'm trying to develop a plugin for eclipse.  In the plugin.xml I defined 2 wizards. Each one as an own id but the same class.
the plugin.xml is this


<plugin>
   <extension
         point="org.eclipse.ui.newWizards">
         <category
               id="MyWizards"
               name="My wonderful Applicaton">
         </category>           
  
      <wizard
            category="MyWizards"
            class="com.app.template.ApplicationWizard"
            hasPages="true"
            icon="icons/logo.gif"
            id="ApplicationInitiated"
            name="Application Initiated"
            project="true"/>

       <wizard
            category="MyWizards"
            class="com.app.template.ApplicationWizard"
            hasPages="true"
            icon="icons/logo.gif"
            id="NetworkInitiated"
            name="Network Triggered"
            project="true"/>
   </extension>
</plugin>


Now, when I run the plugin, I would like to get the id in the code (the class"com.app.template.ApplicationWizard").
For instance, if I choose "Application Initiated" the id is ApplicationInitiated, if I choose "Network Triggered" the id is NetworkInitiated.

Somebody can help me?
thanks





Passa a Yahoo! Mail.
La webmail che ti offre GRATIS spazio illimitato, antispam e messenger integrato.            

_______________________________________________ pde-dev mailing list pde-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/pde-dev

Back to the top