Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Generating code with Acceleo from Sirius digram model
Generating code with Acceleo from Sirius digram model [message #1828569] Fri, 12 June 2020 14:12 Go to next message
Sel ma is currently offline Sel maFriend
Messages: 16
Registered: June 2020
Junior Member
Hi,

I have created a diagram model based on my DSL on Sirius and now I am looking to generate java code of this model by using Acceleo.
My questions :

-Do I create the Accelo project in the DSL project or in the runtime where I create the diagram model?
-How can I save my sirius diagrams I created it already ? Do I have to create a new runtime configuration each time for a new diagram model?

Thanks, I will really appreciate your help

Re: Generating code with Acceleo from Sirius digram model [message #1828571 is a reply to message #1828569] Fri, 12 June 2020 15:41 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 496
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Sel ma,

You should take a look to this tutorial about how to built an update site containing your modeler: https://wiki.eclipse.org/Sirius/Tutorials/UpdateSiteTutorial, we your Acceleo project will be ready you will have the possibility to add the corresponding plugins or feature to the update site. You final user will have the possibility to install your dsl and modeler in their environment, there is then no need to launch a runtime to use it.

Your diagrams are currently saved the workspace used by your runtime (more precisely, in the .aird file of your project).

Regarding the creation/initialization/test of the Acceleo project, it should be possible to create directly in the workspace in which you have your DSL project. I think that as soon as you put the correct dependencies between the plugin project, the completion/validation in template editors will be correct.

You will have the possibility to test your generator and or launch actions from the runtime on the files or elements of the model on which you enable the generation.
You might also import your acceleo project in the runtime workspace to ease the first tests as you this will allows to have the metamodel plugins deployed and some sample models directly accessible.

Regards



Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Re: Generating code with Acceleo from Sirius digram model [message #1828886 is a reply to message #1828571] Sun, 21 June 2020 12:08 Go to previous messageGo to next message
Sel ma is currently offline Sel maFriend
Messages: 16
Registered: June 2020
Junior Member
Hi Maxime,
Thank you for your replay!
I should probably paraphrase my request !

I want to generate Java code from the model defined with my Sirius editor using Acceleo, could you guide me on how to start? and the next steps to follow

To start with : Should I create the acceleo project to generate the java code of my model created by Sirius :
In the workplace ( where .edit and .editor and my metamodel were created )
Or
In the runtime configuration(where the Sirius model is created )

Best regards
Re: Generating code with Acceleo from Sirius digram model [message #1828937 is a reply to message #1828886] Mon, 22 June 2020 16:33 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6878
Registered: July 2009
Senior Member
Hi

A good place to start is an Acceleo tutorial.

Where to put it is a design decision.A simple Acceleo template may only be a couple of files, so hardly worth a separate project. But it inflicts extra dependencies which may well justify an extra project.

However your question looks suspiciously like the newbie misunderstanding that Acceleo is just an M2T tool and language to translate a model into text, which might be Java. You have to write the M2T program to produce the Java. Just the same as a Java program will calculate prime numbers for you, but only after you write the program.

Regards

Ed Willink

Previous Topic:[ANN] Sirius 6.3.1
Next Topic:How can I add IDoubleClickListener for edition table?
Goto Forum:
  


Current Time: Tue Oct 27 21:55:40 GMT 2020

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

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

Back to the top