Creating an Eclipse Builder with Xpand [message #875856] |
Wed, 23 May 2012 13:08 |
Cornelius Dirmeier Messages: 2 Registered: May 2010 |
Junior Member |
|
|
Hi,
I like to create code generator integrated into my eclipse plugin as an incremental eclipse builder. I am just evaluating several code generation frameworks and I think Xpand fits very well.
The user is able to create some objects with my plugin. To allow the user to manipulate the generated code I need to use JMerge!
My plan:
In the first builder step I map the created objects to a generator model (POJO). In second step of the builder I call Xpand (by XpandFacade?) to create code from my generator model using the templates. The output of Xpand should be a String (or Stream) to get the code transfered to jmerge in the third step. After merging user code and generated code I write the content to an eclipse resource IFile.
My questions:
- Does this plan sound good or would you take another framework or tool?
- How could I tell Xpand not to write java.io.File but to a StringBuffer or OutputStream?
- What is the best way to call the Xpand code generator in the builder?
Thank you for support.
Cornelius
|
|
|
Powered by
FUDForum. Page generated in 0.03268 seconds