views:

23

answers:

2

hi i am using eclipse as IDE for the development of my application. I have one doubt. I have one plugin that is capable to creating a class on from one xml file. Now, the problem is that i have many xml files and classses to generate..

can anyone please tell me how to invoke the plugin from my java test class, so that i can create classes all together..

Please help me.

+1  A: 

I'm not sure which plugin you have in mind, but considering that Eclipse is written in Java itself, you are likely to be able to find a suitable jar file that implement what you need. How its API is documented depends on the plugin (in some cases, you might even be able to find its source code). It's possible that using such a plugin may require using OSGi, since it's what Eclipse uses for its plugins.

However, if your goal is to generate classes from XML (presumably XML shemas) there are libraries for this that you can use directly, for example:

Bruno
A: 

The Eclipse Dali Plugin is able to generate Java classes from an XML schema. In the link below see the section on "JAXB Class Generation".

  • ttp://www.eclipse.org/webtools/releases/3.2.0/NewAndNoteworthy/jpa.php
Blaise Doughan