[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [ATL] Using MARTE Profile in ATL

Got the answer, Just to help the guys dealing with the same problem in future, its the issue regarding the ATL configuration and now the syntax. Just go to the run menu and there, where u specify the UML Registry uri, make sure that the relevant UML MARTE package is present. I don't know how to install it but when i updated the MARTE plugins it worked. I could see the 'HwComputing package.

Regards,
-aamir-






Aamir wrote:
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) }