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
1
vote
1 answer

How to check SysML stereotypes with Acceleo?

I'm using Eclipse 4.6.3 (Neon.3) with Acceleo 3.6.6, Paprus 2.0.3 and Papyrus SysML 1.4 0.10.1. How can I check from an Acceleo MTL script, whether a class of my model has the SysML Block stereotype applied? The method getAppliedStereotypes() only…
1
vote
0 answers

Generate documentation from annotated Acceleo

As I'm currently doing research on model-based testing I often have write a lot of acceleo code. I'm currently at a point where I asked myself whether it is possible to generate automatically a documentation from my annotated acceleo templates and…
1
vote
1 answer

Disable exception handling in Acceleo engine

In Acceleo, when I edit and save, say, generate.mtl, Acceleo automatically generates Generate.java class. From this java class I can call doGenerate method from an external class to generate my model-based stuff. However, if there is some exception…
pedromateo
  • 2,965
  • 1
  • 18
  • 19
1
vote
1 answer

Acceleo - Cross models reference with Java Application

I am generating code starting from two related Metamodels. The main one has references to classes of the second one. The Acceleo execution works well when executed as an Acceleo plugin but not when executed as a Java application. If I start the Java…
DeLac
  • 1,068
  • 13
  • 43
1
vote
1 answer

Generate if file does not exist precondition

I would like to test if a file does not exist before generate it. Is it possible to use something like isFileExist ? [template public generate(conf : Configuration) ? (isFileExist('/path/to/file.txt'))] [file ('/path/to/file.txt', false,…
Mickaël Gauvin
  • 607
  • 7
  • 15
1
vote
4 answers

Acceleo code-generation doesn't start, Couldn't load main class

I created a new very easy Acceleo project, with just one main module generate.mtl that tries to create a new file. The package is exported in the Manifest. When I launch the .mtl file, I get this error !MESSAGE Couldn't load class…
DeLac
  • 1,068
  • 13
  • 43
1
vote
2 answers

Check if a EReference exists on the instance (Acceleo)

I have two Eclasses(call them X and Y) in my metamodel and a containment(X contains Y) relation between them which lower bound is 0 and upper bound is 1. I need to know in my .mtl file if the user has added this only instance of Y in order to add…
omniyo
  • 330
  • 2
  • 6
  • 19
1
vote
1 answer

How to use Acceleo and Sirius?

I want to generate code with Acceleo 3.4.x where my metamodel is custom DSL created with Sirius project. Created Sirius diagram is split into two files: aird file for graphical data, and one file for semantic data which is practically XML file. …
sninja
  • 401
  • 1
  • 6
  • 14
1
vote
1 answer

Papyrus template parameter

I am trying to add template parameter to class without any success. I want to make class that have template parameter like Range. Those Papyrus support that?
nrofis
  • 8,975
  • 14
  • 58
  • 113
1
vote
0 answers

How can I rename an element (e.g.: Association) in Acceleo

I've been working with Acceleo 3.2.2 for awhile lately but this is my first approach and there are many basic points that I'm still missing.. In my .mtl file I have created a new association for a class: [anAssocClass.createAssociation(true,…
Leonardo
  • 11
  • 2
1
vote
2 answers

acceleo get stereotypes' attributs from within a module

I'm writing a module which writes an LDIF file, I've a stereotype called 'User' defined by a metaclasse that have many attributs (username, password, role,..) The problem is that I cannot access those attributs from within the module.. How should I…
Oussama L.
  • 1,842
  • 6
  • 25
  • 31
1
vote
1 answer

Java service can't be called using Acceleo

I've defined a custom meta-model using EMF Ecore and now I'm writing an acceleo project to generate proper java code. Acceleo is not enough for several use cases, mainly searching the model for specific elements and holding extra information for…
Muaz Othman
  • 427
  • 4
  • 13
1
vote
1 answer

Attempting to generate java class from uml in Acceleo

I have been trying to get going with Acceleo. I use Enterprise Architect to design my classes, and have exported them as XMI. In Eclipse, when I try to generate even a simple class using Acceleo, I get the following error. Can anyone advise me as to…
Magick
  • 4,603
  • 22
  • 66
  • 103
1
vote
1 answer

Papyrus/Acceleo jumpstart - classes?

My company is evaluating M2T technology. We currently use EA 7.x to model and an in-house template processor to generate code. We're looking to move to industry standard tooling. Our primary focus is evaluating Papyrus and Acceleo as they are…
Joe G
  • 11
  • 1
1
vote
1 answer

Acceleo stand alone - first parameter is proxy

It may seem like I am asking a question already asked before, but the solutions indicated in the other forum posts don't work for me. I am trying to run an Acceleo project in a standalone. public void registerPackages(ResourceSet resourceSet) { …
Mathias Colpaert
  • 652
  • 6
  • 23