Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Difficulty getting a code generator to run automatically
Difficulty getting a code generator to run automatically [message #560233] Tue, 21 September 2010 15:56 Go to next message
Woodsie  is currently offline Woodsie Friend
Messages: 1
Registered: September 2010
Junior Member
We are using JiBX to generate XML and XSD Schemas. JiBX provides an eclipse plugin that uses custom.xml, binding.xml and the java code to generate some class files for producing the XML. This all works well.

One of my developers has created a generator that processes annotations in the java class files for generating the custom.xml and binding.xml files. This again works fairly well if we run the generator manually.

But I would like to run this generator automatically as part of the eclipse build before the JiBX plugin runs it's build step. It seemed to me that the way to do this was to create a Builder step within the project. But it would seem that the Builders will only run external programs or ant tasks and there is no way of running something that is within the workspace.

The best I could do was an ant script running the generator. But I could not get the classpath to work. I was able to access the class files in the project that the generator is in. But this became more complex when I hit classes in other project dependancies. Third party JAR dependancies where then impossible, especially given the fact that we are managing these dependancies using IvyDE.

Am I missing something here, or are we going to have to continue with remembering to do the manual code generation?
Re: Difficulty getting a code generator to run automatically [message #624515 is a reply to message #560233] Wed, 22 September 2010 05:15 Go to previous message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
Your plugin should programatically add the builder to the project. Look at http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/resAdv_builders.htm and http://www.eclipsepluginsite.com/builders-natures-markers-3. html
Previous Topic:Multi Threading debug
Next Topic:How to import Package Folder
Goto Forum:
  


Current Time: Fri Apr 26 01:04:03 GMT 2024

Powered by FUDForum. Page generated in 0.03474 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top