开发者

calling plugin from java code

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 class开发者_Python百科ses 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.


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:

  • JAXB
  • Apache XML Beans
  • Relaxer (for Relax-NG, not for XML shema, with some brief documentation in English within the zip file)


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜