|
Re: [acceleo] How can I generate code automatically as a dependency on the target project? [message #638018 is a reply to message #638012] |
Tue, 09 November 2010 16:15 |
|
Hi Jeff,
Just a quick response right now because I am working on an example to realize pretty much what you are describing so a more complete answer will come later (...several days since I have some work right now).
If I were you I would create an acceleo ui project from your regular Acceleo project, then deploy it as a plugin (or launch a new eclipse instance) and then you have access to the menu to generate the code from an action on your model (right clic -> acceleo model to text -> generate). But this action has to be launch manually and it would not clean the previously generated files. In order to that, yuo would have to modify the generated ui project to, instead of creating an action, create a builder.
Then with your builder you just have to make sure that you try to build something juste when your model has been modified (for example). When an event on your model appears you can just clean the folders with your generated code and then launch the generation just as its done in the ui project.
I would advise you to look for documentation on Eclipse builder and the org.eclipse.core.resource.builders extension point. For the "delete the generated elements with the clean action", I don't where it is but I think it would be in the builder too.
Stéphane Bégaudeau, Obeo.
[Updated on: Tue, 09 November 2010 16:17] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03225 seconds