Questions tagged [acceleo]

Acceleo is a code generator transforming models into code (MDA approach). See "about the Acceleo tag" for initial help.

Acceleo is a code generator transforming models into code (following the Model-Driven Approach). It is part of the Eclipse foundation, and distributed as part of its annual release train since Eclipse Ganymede (version 3.4).

All of the Acceleo documentation can be found on the Eclipse Help Center.

156 questions
0
votes
1 answer

Generate field from association

I want to generate a field from association. The problem that I have is that I'm using: [for (p: Property | aClass.getAssociations().ownedEnd -> select(p: Property | p.type <> aClass)) separator('\n')] [p.visibility/] [p.type.name/]…
user3212350
  • 401
  • 1
  • 6
  • 18
0
votes
1 answer

How closure work in acceleo?

I have a element with a child element name nextElement a.nextElement is b b.nextElement is c c.nextElement is d When I do a request a->closure(a.nextElement) I expect to get a set with b, c and d but I only get b. What I am not understanding or…
Martin Paquin
  • 83
  • 1
  • 7
0
votes
1 answer

An Acceleo-based generator built with Maven does not work on Obeo Designer 6.2

I have an Acceleo-based generator that generates text files from UML classes. I want to run it on Obeo Designer. I created it in Obeo Designer 6.2. When I build and debug my application locally from Obeo, everything works fine. But if I build my…
0
votes
0 answers

Acceleo generator doesn't find applied stereotypes when processing submodel unit from Papyrus

I'm using Acceleo in stand alone mode to generate source code from UML model (edited with Papyrus). I followed this tutorial https://wiki.eclipse.org/Acceleo/Maven (using same versions). I created my own uml profile and applied some stereotypes on…
Fly
  • 21
  • 4
0
votes
1 answer

Nothing is generated and no error although model and module are loaded

I tried to use Acceleo to translate a model to a text in an Eclipse plugin. The model is fine and the loaded Acceleo module looks fine as well. Still, acceleo does not generate anything. Here is my code: AcceleoService as = new…
jsf
  • 913
  • 3
  • 14
  • 22
0
votes
1 answer

NPE running Acceleo generator

I have a Acceleo project (a bunch of *.mtl files, and a Java class which can generate output using these templates). The project works fine as long as I run it from inside Eclipse, but when I compile the *.emtl files using Maven I get a…
JesperE
  • 63,317
  • 21
  • 138
  • 197
0
votes
2 answers

Acceleo M2T - Write timestamp into a generated file

I am generating some files by using different Acceleo templates defined into a *.mtl file. At the top op these files I need to write something like: #----------------------------------------------------------------------------- # Project…
pedromateo
  • 2,965
  • 1
  • 18
  • 19
0
votes
1 answer

generate code for the multivalue attribute in Acceleo

how I can generate code for the multivalue attribute? In my metamodel, I have a class named A, and its attribute named B that is multivalue. Attribute B`s type is class C. In the modelling, I set two value for attribute B. For example, C1 and…
0
votes
1 answer

Acceleo: dynamically generate HTML grid in a for loop

I'm using Acceleo 3.0 to generate some html code from an EMF Model. I have the following code:
[for ( icon : Icon | self.Icons )]
Gian Luca Scoccia
  • 725
  • 1
  • 8
  • 26
0
votes
1 answer

Accessing elements properties in a EMF Compare Diff Model

I have used EMF Compare to compare 2 models comforming to a custom metamodel. I generated and saved the Diff model to an .xmi file. Currently, I am working on how to use the Diff Model within ATL to transform the differences to another model. The…
user3488996
  • 1,339
  • 2
  • 10
  • 13
0
votes
2 answers

Acceleo java wrapping service doesn't take complex parameter - Invalid result for expression self.invoke

I can't call a java wrapping service in Acceleo because it doesn't recognize parameters type. This is my simple test code: the main calls a query stored in Services.mtl, that calls the java service that just return the name of an object…
DeLac
  • 1,068
  • 13
  • 43
0
votes
2 answers

Can´t run acceleo uml2java example

I´m beginning with Acceleo. I installed eclipse-modeling-luna-M6-win32. Then i installed acceleo by update on eclipse. (is there any better option?) Trying to use the uml2java example. To run it i tried to run…
user2323664
0
votes
0 answers

Exporting an Acceleo 3.0 generator as an Eclipse Plugin

I have created a code generator based on Acceleo 3.0. I am trying now to deploy it as an Eclipse plugin in order to be able to install it on different instances, but I didn't succed. I created a Feature project, then I added the generator projet to…
user3488996
  • 1,339
  • 2
  • 10
  • 13
0
votes
1 answer

Acceleo counting occurrences

I've recently started working with Acceleo and it's really hard to me. Nevertheless I've encountered a problem: All variables are 'final', but I'd like to count how many times occurred specific statement. Let's say: how many times I have 'if'. I've…
0
votes
2 answers

How to import a module?

What is the right way to import a module? I have a main modul called DatabaseGenerator. It's located under eu.the4thfloor.dme.generator.main.DatabaseGenerator.mtl I have another modul called DatabaseGeneratorHelper. This is located under…
Ralph Bergmann
  • 3,015
  • 4
  • 30
  • 61