Title: RE: [Andromda-devel] Help please. Trying to step over an association.

Hi all,

Sorry Chad have good solution, I made some Velocity mistakes. Thanks again.

Razvan

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 14 mai 2004 09:26
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [Andromda-devel] Help please. Trying to step over an associat ion.

 

Hi Chad,
Thank you. Works your solution, but unfortunately I didn't explain correct my problem :).
In following situation:
|class1|----asoc------->|class2|
I want to obtain class2 stereotype when androMDA  is triggered in class1. So, I want to know stereotype for
$class1.associationend.otherend.class2 I hope that now was better explained. It is this possible only in Velocity templates?

Thank you,
Razvan

-----Original Message-----
From: Chad Brandon [mailto:[EMAIL PROTECTED]]
Sent: 13 mai 2004 20:02
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Andromda-devel] Help please. Trying to step over an association.

Hi Razvan,

--- [EMAIL PROTECTED] wrote:
> Hi all,
> I try to write a cartridge in Andromda 3.0M1 and
> have the following problem:
> It is possible to check stereotypes over an
> association using only
> templates?
> I.e. I try to write in template something like:
> #foreach ( $associationend in $class.asociationEnds
> )
> #foreach ( $stereotype in
> $associationend.otherend.stereotypes )
> #if ( $stereotype.name == "mystereotype")
> code;
> #end
> #end
> #end
>
> Until now doesn't work for me, as I understood
> 'otherend' doesn't point to
> an classifier. It is something wrong in my code, or
> I must try another
> approach (metafacade??)?

Try:
${associationend.otherEnd.type.hasStereotype("mystereotype")}
if your associationEnd type has the stereotype or
${associationend.otherEnd.hasStereotype("mystereotype")}
if its your actual associationEnd that has the
stereotype.

>
> Thank you,
> Razvan
>
> PS: AndroMDA is one of the greatest tool that I see.
> Thank you!

You're welcome! :)

-- Chad

>

Reply via email to