Questions tagged [acceleo]
Acceleo is a code generator transforming models into code (MDA approach). See "about the Acceleo tag" for initial help.
148
questions
0
votes
0
answers
4
views
Abstract Class in Acceleo Transformation
how to show the abstract class in generate.mtl file of Accelo transformation into java.
Currently, I am writing this code but it's not working...
[if (aClass.isAbstract=true)]
public abstract class [...
0
votes
0
answers
12
views
Activity Diagram with Acceleo
Actually, I start working with Acceleo few days ago.
I need to work on project that transform the activity diagram to XML.
So in generate. ml I would like to go in all components of the activity ...
0
votes
1
answer
35
views
How can I create a services in Capella and call it in my M2DOC Word document?
How can I create a services in Capella and call it in my M2DOC Word document?
I want, for example, create a services for print a functional tree, and use this code in many different documents without ...
0
votes
0
answers
67
views
Running Acceleo from within Sirius
I am trying to run a simple Acceleo generation pragmatically from within a Java Services class of my Sirius Viewpoint Specification Project. I can run the Acceleo mtl from 'Run Configuration' and it ...
0
votes
1
answer
57
views
Xtext to Acceleo
I have a xtext code for an expression like this:
expr : RelExp ( {LogicExp.args+=current} op=LO args+=RelExp)* ;
RelExp returns expr : ArithExp ( {RelExp.args+=...
0
votes
2
answers
147
views
Acceleo M2T (Cannot access to the my matamodele attributes , references .. )
I am developing a M2T generator in Acceleo (in Obeo Designer).
I have created my metamodel based on *.ecore (pfe.ecore ) and then I have created an instance model in runtime (MyModels.pfe) using ...
0
votes
1
answer
63
views
Can I reference java.ecore in project.ecore without relative path? but use module references instead?
In our Project we are using Acceleo to generate Java code from our eCore Models.
We have created a file called "java.ecore" which contains java standards that we are using (e.g. java.io.Closeable)
...
0
votes
1
answer
58
views
Impossible to delete blank line in generated word with template
I'm currently using m2doc for my Capella project and when I launch the generatio of the docuement with the template that I have created some lines in my tables are empty and they are not deleted.
...
1
vote
0
answers
48
views
AcceleoCompiler Deprecated
New versions of Acceleo deprecated the AcceleoCompiler without any mention of substitute class to use. Is ANT not being supported anymore to compile Acceleo? What is the alternative way to compile ...
0
votes
1
answer
89
views
How to query the root element from importURI?
I'm developing a DSL, and I'm using Xtext's importURI attibute to deal with imports. It is working fine in the editor, but I don't know how to query the root element of the resource from the ...
0
votes
1
answer
218
views
Problem with Java model to source code transformation
I have a problem with Java source code generation of Modisco java model.
I used this guide below in Modisco Documentation :
https://help.eclipse.org/2018-12/topic/org.eclipse.modisco.java.doc/...
2
votes
0
answers
64
views
An internal error occurred during: "Acceleo" on fresh install
After fresh Eclipse install (Windows 10, 64bit, JRE 1.8.0_181-b13) I installed Acceleo 3.7.7.201812041426. But after creating new project (2002/ecore with "Generate file" and "Main template") it ...
0
votes
0
answers
60
views
Getting nodes of a Abstract Syntax Tree of Acceleo Query Language in java
I am want to calculate the number of nodes in a AST od a AQL expression.
My code is as following.
public static void aqlParser(String queryString ) {
IQueryEnvironment queryEnvironment ...
1
vote
0
answers
104
views
Acceleo Compiler (.mtl to .emtl) for version 3.7.x
I'm trying to search for the alternative approach to compile Acceleo to generate .emtl from .mtl file using Acceleo Parser version 3.7.x outside eclipse but had not luck.
AcceleoCompiler(Helper) which ...
3
votes
0
answers
353
views
Acceleo Builder error since eclipse 2018-12 update
since Eclipse update to 2018-12 I can't build any Acceleo project with Query.
I use Acceleo 3.7.7
and update EMF to nigthly version to solves this issue :
https://bugs.eclipse.org/bugs/show_bug....
0
votes
0
answers
129
views
The problems occurs when I follow the Acceleo Getting Started guidance in the wiki to generate java code from uml
I spend several days to follow the Getting Started guidance in the wiki to generate java code from uml. I found some problems during the steps and failed to generate code.
This is the link of the ...
1
vote
2
answers
300
views
OCL group by element attribute
In Acceleo I have an OrderedSet of objects, where each object has a string as attribute.
I want to get a container(e.g. OrderedSet) of those strings, where each string is unique.
0
votes
2
answers
348
views
Acceleo - Reference to another model
I am facing a problem and I am kind of desesperate :
I am trying to transform a constraint OCL into a C# program. To do so, I define my ocl constraints in a CompleteOCL document, and I save it as ...
0
votes
1
answer
980
views
Acceleo Trasformation - Package with uri '*' not found.
When I try do to an acceleo trasformation I get this error:
Exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi....
1
vote
2
answers
284
views
Debugging Acceleo M2T Transformation within MTL file
I'm currently setting up an Acceleo project to generate Java source code from an Eclipse UML2 model. I do have experiences with the Xtend code generator, but not with the Acceleo one. However, I ...
1
vote
1
answer
268
views
How to model/generate Java 8 Optional attributes with Eclipse EMF
I want to model a class with a field of type Optional<String> but can't find a EOptional EType or equivalents options to maker the attribute optional.
1
vote
1
answer
246
views
overwrite or extend a template in an Acceleo template
I have 3 template for example:-
main, genA, genB
The genB module is a specification for genA and supposed to overwrite one template bar. The problem is, that if you call the overwritten template ...
0
votes
1
answer
98
views
Unable to get Requirement in Acceleo
Can not get the Requirement from the model. I have tried getAppliedStereotypes() but it still not works. The code is as the following:
[comment encoding = UTF-8 /]
[module maintest('http://www....
0
votes
1
answer
270
views
Fali to use getAppliedStereotype to get id and name of requirement
In Eclipse, Using Papyrus neon and Acceleo 3.7 for SysML 1.4 diagram, the getAppliedStereotype()returns null.
The modules are
[module generate('http://www.eclipse.org/uml2/5.0.0/UML',
'http://www....
0
votes
0
answers
780
views
Can't find main class in Maven generated project
I'm using Acceleo to create a maven project which creates a .jar app... I have a "generate.mtl" file, calling other .mtl files one of which is the following genPOM.mtl
[comment encoding = UTF-8 /]
[...
1
vote
2
answers
209
views
Acceleo file tags
I'm new to Acceleo and I'm trying to figure out some things about the file tags I can use.
The format I see most commonly is something like that:
[file (someElement.anotherElement.concat('SomeText....
0
votes
1
answer
152
views
Debug Acceleo mtl transformation
I have eclipse neon with Acceleo 3.7 and writing a simple example (the same as the one in Getting Started) but I cannot debug the transformation using the 'Acceleo Plug-in Application' configuration. ...
1
vote
1
answer
539
views
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 ...
0
votes
1
answer
725
views
Acceleo: The generation failed to generate any file
First of all , I am new to Acceleo and the modeling features of eclipse. What I am trying to do is just to create a simple test file. So for starters, I created a main module:
comment encoding = UTF-...
0
votes
1
answer
242
views
Cannot retrieve stereotypes from UML model generated using Papyrus with Acceleo
I am currently testing out the DSL capabilities of Papyrus in combination with Acceleo and I am currently encountering a problem.
I created a simple relational database metamodel using UML 2 profiles ...
0
votes
1
answer
92
views
Generate react native code from sirius
Good evening ,
I want to generate react native code from the sirius but I do not know how and is it possible to use acceleo for that ??
Thanks for helping me .
2
votes
0
answers
234
views
Acceleo not resolving proxy when running standalone
I'm trying to perform a model-to-text transformation to html code using an IFML model.
I have this mtl file:
[comment encoding = UTF-8 /]
[module main('http://www.omg.org/spec/IFML', 'http://www.omg....
0
votes
1
answer
357
views
UML metamodel not found in createing Acceleo project
I am new in Acceleo. I use eclipse Mars. I want to getting start and learn with this link. when I want to create a new project and click add in the field of Metamodel URIs I didn't find UML Metamodel. ...
0
votes
1
answer
224
views
Acceleo UI doesn't generate any files
I have a GMF editor and an Acceleo UI project that I would like to bundle in a single plugin. That's not the matter though.
You see, when executed in the runtime (Run as > Eclipse Application), both ...
1
vote
0
answers
70
views
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 ...
2
votes
2
answers
922
views
How to set custom metamodel in Acceleo project?
I try to make generator from my custom metamodel. I created it by Obeo Designer - it is ecore metamodel.
So I create new Acceleo Project, choose my metamodel URI (http://org/model/ros) from "Runtime ...
0
votes
1
answer
252
views
How do I compare the value of the current and the previous iteration in a for loop in Acceleo?
Is it possible to compare the value of the current and the previous iteration in a for loop in Acceleo?
Knowing that LET can be defined inside for loop but it will be mutable at each current ...
0
votes
1
answer
648
views
Cannot Access SysML stereotypes and their properties in Acceleo
I am developing a M2T generator in Acceleo (in Eclipse). The model is basically a UML model with SysML profile created in Papyrus. It includes Blocks and FlowPorts. I have to access these stereotypes ...
0
votes
1
answer
152
views
Acceleo. One of the parameters' class couldn't be loaded for method
When I invoke a java service with input string parameter I obtain the error One of the parameters' class couldn't be loaded for method returnString(String) of class es.bancopopular.easy.toFast....
0
votes
2
answers
634
views
Acceleo. Indent strategies
I'm testing Acceleo for a project to generate source cobol code. In this languaje the indentation is very important.
I've found a guide to indent strategies, but I think is outdated because it have ...
0
votes
1
answer
542
views
Acceleo Undefined "Let" expression
I am getting the error:
Acceleo Evaluation Exception: Undefined "Let" expression at line .. in Module ... for block ...
Here is my template:
[comment encoding = UTF-8 /]
[module generate('http://www....
0
votes
2
answers
311
views
Dynamic Acceleo Project Plugin
I want to run an Acceleo Project from an Installed Plugin,
i.e. I have written a plugin that uses Acceleo and I want it to run an Acceleo template from a project that is in the workspace.
Currently,...
0
votes
1
answer
389
views
Which versions are required to get a working Acceleo Maven build
Has anyone got the Acceleo Maven build to work?
If so what combination of Maven, Tycho, Eclipse, Acceleo, UML2/ecore worked for you?
And as a supplementary question do you still need to adjust the ...
0
votes
1
answer
428
views
How do I get "xmi:type" value
I am trying to generate a java program to implement a State Machine from a UML model using Acceleo.
In my model I have entries like:--
<subvertex xmi:type="uml:State" xmi:id="{BB1999-E740-4e7d-...
0
votes
1
answer
486
views
Acceleo Collection of Collections
I have defined this query
[query public genCascadePath(aCSharpResourceModel : CSharpResourceModel) : Sequence(Sequence(CSharpResourceModel)) =
aCSharpResourceModel.hasRelatedCSharpRMManager->...
3
votes
2
answers
3k
views
Acceleo transformation using a custom ecore metamodel
First of all , i am new to the modeling features of eclipse, so the question may be trivial, but i am searching for days and haven't found an answer.
I have created an ecore metamodel file with an ...
0
votes
0
answers
626
views
How to break for loop in Acceleo template
Can someone help me with loop of for in Acceleo template mtl.
[for (it:attributeClass|amodelClass.classHasAttribute)]
[for (it2:attributeClass|amodelClass.classHasAttribute)]
[if (it....
0
votes
1
answer
190
views
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)) ...
0
votes
1
answer
145
views
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 ...
3
votes
0
answers
167
views
Run Acceleo from Windows command line using Maven
We are using Eclipse Indigo, Acceleo 3.1.3, Maven 3.0.3.
We have a large Acceleo code generation project in Eclipse that we run successfully.
We need to now run that same project via command line ...