Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo] How can I generate code automatically as a dependency on the target project?
[acceleo] How can I generate code automatically as a dependency on the target project? [message #638012] Tue, 09 November 2010 16:04 Go to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
I'm starting Android development with Acceleo and my knowledge of Eclipse fundamentals is a bit sparse.

Ideally what I'd like to be able to do is configure the "target" project for which code is being generated recognize that the generated source files have a dependency to the Acceleo project and automatically generate them if they're missing. I'd also like to be able to configure the target project to remove the source files upon issuance of the "clean" command.

Can someone point me to the right place to look for Eclipse build and dependency configuration or even better let me know what to do specifically for Acceleo?

Thanks!
Jeff
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 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

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

Re: [acceleo] How can I generate code automatically as a dependency on the target project? [message #638024 is a reply to message #638018] Tue, 09 November 2010 16:27 Go to previous message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Thanks very much for the fast answer! I'll start reading up on it. Most of my experience with build configurations is using make, and upon poking around in Eclipse, I thought maybe Ant would be the route I should follow. I'll go read about Eclipse builders. Thanks!
Previous Topic:[Acceleo] Problems with Real division
Next Topic:(Acceleo) Acceleo Evaluation Exception
Goto Forum:
  


Current Time: Thu Apr 25 22:07:01 GMT 2024

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

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

Back to the top