|Creating an Eclipse Builder with Xpand [message #875856]
||Wed, 23 May 2012 13:08
| Cornelius Dirmeier
Registered: May 2010
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!
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.
- 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.
Powered by FUDForum
. Page generated in 0.01810 seconds