Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Generating code with Acceleo from Sirius digram model(How to start? What is metamodel URI for Sirius?)
Generating code with Acceleo from Sirius digram model [message #1219294] Tue, 03 December 2013 08:18 Go to next message
sninja sninja is currently offline sninja sninja
Messages: 16
Registered: October 2013
Junior Member
Hi,

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.

Here are my questions:

1. What is metamodel URI if I'm using Sirius diagram?
2. Are there any examples for Acceleo and Sirius for this case?
3. I presume, since both projects originated from Obeo, that this is possible?

Thanks.
Re: Generating code with Acceleo from Sirius digram model [message #1219305 is a reply to message #1219294] Tue, 03 December 2013 09:01 Go to previous message
Pierre-Charles David is currently offline Pierre-Charles David
Messages: 134
Registered: July 2009
Senior Member
Le 03/12/2013 09:18, sninja sninja a écrit :
> Hi,

Hi.

> 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
[1] (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
EPackage(s)).

> 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
> possible?

Yes it is, but not because of some specific integration between the two
projects. They simply both work with your unmodified semantic metamodel.

[1] https://github.com/ObeoNetwork/UML-Modeling
Previous Topic:Syntax for Column Finder Expression
Next Topic:[Request] integration with xcore
Goto Forum:
  


Current Time: Sat Oct 25 03:40:15 GMT 2014

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

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