|Re: [ATL] Reference output model elements [message #70666 is a reply to message #70651]
||Mon, 07 January 2008 11:59
Registered: July 2009
Hi Stefanie, you have to import the profile as metamodel if you want to |
apply some stereotype to your output elements.
This is the header of a sample transformation from profile A to profile B:
create OUT : UML2 from IN : UML2, PRO : UML2;
IN and OUT are the UML2 metamodel and PRO is the .uml definition of
The following is a rule that matches a stereotyped UML Component and
generates a stereotyped UML Class:
s : UML2!Component
t : UML2!Class(
t.applyStereotype(<here you put the Stereotype definition contained in
t.setValue(<Stereotype definition contained in PRO>, '<propertyName>',
helper context UML2!Element def: isStereotypeApplied(name : String) :
not self.getAppliedStereotypes()->select(p |
p.name = name
This is how I tackled the problem of applying stereotypes to UML elements
and set the values of UML Tagged values.
I hope this will be useful, regards
stefanie zhao wrote:
> Hi, Thanks very much, it's really helpful.
> But I have another question, can I set the stereotype properties, just
> in the same procedure as i set the basic properties of this element. I
> need to set some properties defined in the stereotype to refine my PIM
> to get a PSM.
> Should I import the profile as a metamodel?
> Thanks again.
> Tristan FAURE åé:
>> Hi !
>> when you match you match your element in an ATL rule you can add some
>> condition example
>> from o : UML!Operation(myCondition)
>> and it exists the function getAppliedStereotypes()
>> you can do getAppliedStereotypes()->select(s | s.name = "Invoke")
|Re: [ATL] Reference output model elements [message #70708 is a reply to message #70651]
||Mon, 07 January 2008 15:18
Originally posted by: quentin.glineur.obeo.fr|
This is a multi-part message in MIME format.
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
OK! So, in ATL, you assign a reference of an output object with an input
object. This last will be replaced by a reference to the object created
Therefore, you do not handle directly the references but rather let them
I hope this meets your question.
Lisa Kelly a
Powered by FUDForum
. Page generated in 0.01971 seconds