Book a Demo

Author Topic: stereotypes in model transformations  (Read 2411 times)

twei

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
stereotypes in model transformations
« on: January 28, 2008, 07:04:47 am »
Hi,

I have created a model transformation template in which I want the stereotypes of the to-be-transformed class to show up in the notes of the resutling class.
I did it this way:

Code: [Select]

...
%TRANSFORM_REFERENCE("Class")%
%TRANSFORM_CURRENT("notes")%
notes=%qt%%classStereotype%%qt%
...


This seems to work for just the first stereotype. But my classes have several stereotypes.
How can I tweak my template, so that not only one stereotype is placed into the notes-field?

tobias.

twei

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: stereotypes in model transformations
« Reply #1 on: January 31, 2008, 06:24:49 am »
Well, another issue with multple stereotypes...
This ist the answer I got from Sparx' support:
Quote
Currently multiple stereotype information is not directly available to the code/transform templates.  We have logged this as follows.

Issue ID: 06110238
Description: No access to multiple stereotypes including any parameter stereotypes in code templates

We will add this functionality at some point, but currently the only way to do this is to call an addin that can return Element.StereotypeEx.

This is done using the EXEC_ADD_IN function macro, and there is a couple of examples at:

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=general;action=display;num=1178702191;start=3#3

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.pl?board=Automation;action=display;num=1161847447;start=1#1