From: Chad B. <chd...@ya...> - 2004-05-14 10:47:29
|
RE: [Andromda-devel] Help please. Trying to step over an = association.Great....sorry didn't see this last message before I = responded :) ----- Original Message -----=20 From: Raz...@si...=20 To: chd...@ya... ; and...@li...=20 Sent: Friday, May 14, 2004 3:31 AM Subject: RE: [Andromda-devel] Help please. Trying to step over an = associat ion. Hi all, Sorry Chad have good solution, I made some Velocity mistakes. Thanks = again. Razvan =20 -----Original Message----- From: Raz...@si... [mailto:Raz...@si...] Sent: 14 mai 2004 09:26 To: chd...@ya...; and...@li... Subject: RE: [Andromda-devel] Help please. Trying to step over an = associat ion. =20 Hi Chad,=20 Thank you. Works your solution, but unfortunately I didn't explain = correct my problem :).=20 In following situation:=20 |class1|----asoc------->|class2|=20 I want to obtain class2 stereotype when androMDA is triggered in = class1. So, I want to know stereotype for=20 $class1.associationend.otherend.class2 I hope that now was better = explained. It is this possible only in Velocity templates? Thank you,=20 Razvan=20 -----Original Message-----=20 From: Chad Brandon [mailto:chd...@ya...]=20 Sent: 13 mai 2004 20:02=20 To: Raz...@si...; and...@li...=20 Subject: Re: [Andromda-devel] Help please. Trying to step over an = association.=20 Hi Razvan,=20 --- Raz...@si... wrote:=20 > Hi all,=20 > I try to write a cartridge in Andromda 3.0M1 and=20 > have the following problem:=20 > It is possible to check stereotypes over an=20 > association using only=20 > templates?=20 > I.e. I try to write in template something like:=20 > #foreach ( $associationend in $class.asociationEnds=20 > )=20 > #foreach ( $stereotype in=20 > $associationend.otherend.stereotypes )=20 > #if ( $stereotype.name =3D=3D "mystereotype")=20 > code;=20 > #end=20 > #end=20 > #end=20 >=20 > Until now doesn't work for me, as I understood=20 > 'otherend' doesn't point to=20 > an classifier. It is something wrong in my code, or=20 > I must try another=20 > approach (metafacade??)?=20 Try:=20 ${associationend.otherEnd.type.hasStereotype("mystereotype")}=20 if your associationEnd type has the stereotype or=20 ${associationend.otherEnd.hasStereotype("mystereotype")}=20 if its your actual associationEnd that has the=20 stereotype.=20 >=20 > Thank you,=20 > Razvan=20 >=20 > PS: AndroMDA is one of the greatest tool that I see.=20 > Thank you!=20 You're welcome! :)=20 -- Chad=20 >=20 |