0

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 with Papyrus. I then created a gruesome library model using the meta-model defined.

Then I created a very very simple Acceleo template file, in which I try to print some elements' stereotypes :

[template public generateElement(p : Package)]
[comment @main/]
[file (p.name.concat('_debug.txt'), false, 'UTF-8')]
Creating file for package [p.name/]
Stereotypes: [for (st : Stereotype | p.getAppliedStereotypes()) separator(',')][st.name/][/for]
[/file]
[/template]

When I use the OCL console on my model, "getAppliedStereotypes()" works just fine. But when I run my Acceleo, there is nothing behind "Stereotypes", even though the generator terminates without any error code...

Do you have any idea what is going on ?

1 Answers1

1

This is most likely the same issue as I pointed out for this question. Acceleo generations operate in stand-alone mode, so you have to actually tell it where to find the profile you're using.

The Acceleo FAQ has some examples with "standard" profiles, you will have to follow the same process for your own defined profiles.

Kellindil
  • 4,523
  • 21
  • 20