|Re: Generating code with Acceleo from Sirius digram model [message #1219305 is a reply to message #1219294]
||Tue, 03 December 2013 09:01
|| Pierre-Charles David
Registered: July 2009
Le 03/12/2013 09:18, sninja sninja a écrit :|
> I want to generate code with Acceleo from my DSL defined by Sirius
> graphical diagram.
> Diagram is defined by two files: one for graphical data (aird file) and
> one for semantic data (which is practically XML), if I got it right.
The aird file contains only Sirius-specific data about the (graphical)
representations of your data. The entirety of your semantic data is kept
in your semantic resources, with no references or other kind of
dependency to Sirius and its metamodels.
If you have created a diagram where a blue node graphically represents
one of you semantic element (say an instance of domain.Concept), the
aird file would contain (among other things) an instance of DNode (a
Sirius-specific type ) which corresponds to the blue node and
*references* the instance of domain.Concept stored in your
domain-specific XML file.
> Here are my questions:
> 1. What is metamodel URI if I'm using Sirius diagram?
In 99% of the cases, generators are only concerned about the semantic
data itself and do no care whether or not a diagram has been created for
that data, whether a given element is represented by a blue square or a
yellow ellipse, etc.
To take a concrete example, if you wanted to create a UML-to-Java
generator, its input would be the *.uml files and the corresponding
metamodel URI, and the generator should not care whether that file was
generated programatically, manually using Papyrus (which uses *.umldi
files to store graphical infos), or using the Sirius-based UML Designer
 (which uses the Sirius *.aird files for that).
So in 99% of the cases, if you want to create an Acceleo generator on
your semantic data, you can completely ignore Sirius and the aird files
and take your semantic resource as input (and thus the URI for your
> 2. Are there any examples for Acceleo and Sirius for this case?
I'm not sure, but there would not be much to show beyond a completely
standard Acceleo generator which happens to work on a domain metamodel
for which there also exist a Sirius modeler. As I said, in most cases
you can completely ignore the presence of Sirius and use Acceleo
directly on your semantic model.
> 3. I presume, since both projects originated from Obeo, that this is
Yes it is, but not because of some specific integration between the two
projects. They simply both work with your unmodified semantic metamodel.
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.02807 seconds