Hi all,
I have applied MARTE Profile on a model which i am using as the ATL
input. I try to get the UML Elements which have specific stereotype from
MARTE, applied on them. But it doesn't work, but when i try it with my
own profile/stereotyes, it works.
I have seen some codes, using the line 'uses MARTE' but i don't know
which library to add and from where? Any hints comments r highly
appreciated.
Regards,
-aamir-
THE CODE:
-- @atlcompiler atl2006
module UML2TEST; -- Module Template
create OUT : UML2 from IN : UML2 , IN_PRO : UML2;
uses MARTE;
------------------------------------------------------------------------------
-- Checks if the given stereotype is applied or not.
helper context UML2!Element def : isStereotypeApplied(name :
String):Boolean =
not self.getAppliedStereotypes()->select(p | p.name = name).isEmpty();
------------------------------------------------------------------------------
rule processor {
from s : UML2!Element (s.isStereotypeApplied('HwProcessor'))
to t : UML2!Class(name <- s.name) }