Skip to main content



      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 03:18 Go to next message
Eclipse UserFriend
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 04:01 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Generating code with Acceleo from Sirius digram model [message #1724573 is a reply to message #1219294] Wed, 24 February 2016 12:51 Go to previous messageGo to next message
Eclipse UserFriend
Hi sninja,

Did you solve your problem? I'm having the same issue at the moment, but I have not found a way to solve it, could you help me please?
Re: Generating code with Acceleo from Sirius digram model [message #1822627 is a reply to message #1724573] Tue, 10 March 2020 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Hello. I have generator in Acceleo and code is written in XML language. Is it possible to add java code along with XML? If yes, then what Java files will be important to write as header files?

Looking forward
Re: Generating code with Acceleo from Sirius digram model [message #1822678 is a reply to message #1822627] Wed, 11 March 2020 05:50 Go to previous message
Eclipse UserFriend
Hi

In so far as Acceleo is a general purpose model-to-text tool / programming language, it can certainly be used to generate XML or Java or an interleave of both. But it is a general purpose capability so you will be doing a lot of programming. I would start with something that inherently understands XML, like a model-to-model language or one of many Java support tools and I would really sit back and examine why I want to interleave Java and XML; seems really crazy hard.

Regards

Ed Willink
Previous Topic:Exception when creating a new Representation
Next Topic:Specifying the default model object to create in new model creation
Goto Forum:
  


Current Time: Sat Jun 21 14:28:08 EDT 2025

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

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

Back to the top