[MOFScript] Navigable Asociation [message #380331] |
Thu, 08 November 2007 11:30 |
Eclipse User |
|
|
|
Originally posted by: javjimgon.alum.us.es
Hello,
I would like to know when a end association isNavigable. On order to
generate an attribute only in the class which is in the navigable end of
the association.
Thank you in advance!!
Javier Jimenez
|
|
|
|
Re: [MOFScript] Navigable Asociation [message #380362 is a reply to message #380334] |
Wed, 14 November 2007 08:47 |
Eclipse User |
|
|
|
Originally posted by: javjimgon.alum.us.es
Gøran K. Olsen escribió:
> Hello Javier,
>
> Considering UML.
>
> I have seen different implementations of this so it depends on how your
> model is created.
>
> Using e.g. a model created in Papyrus UML or IBM RSM you traverse your
> ownedAttributes and checks if association !null.
>
> texttransformation NewTrans(in uml:"http://www.eclipse.org/uml2/2.1.0/UML")
> {
> uml.Class::main () {
> stdout.println("Class Name: " + self.name)
> self.ownedAttribute->forEach(p:uml.Property | p.association!=null){
> stdout.println("Navigable Association: " + p.name)
> stdout.println("Navigable AssociationType: " + p.type.name)
> }
> }
> }
>
> on:
> class_0
> Class_1 ------------>Class_0
>
> Gives output:
> Class Name: Class_0
> Class Name: Class_1
> Navigable Association: class_0
> Navigable AssociationType: Class_0
>
>
> /Gøran
>
>
> "Javier Jimenez" <javjimgon@alum.us.es> wrote in message
> news:fgurvs$938$1@build.eclipse.org...
>> Hello,
>>
>> I would like to know when a end association isNavigable. On order to
>> generate an attribute only in the class which is in the navigable end of
>> the association.
>>
>> Thank you in advance!!
>> Javier Jimenez
>
>
Hello Gøran,
thanks for your answer. Finally it was a problem of the UML editor that
I use (Topcased). There is a bug and when you tick the 'isNavigable'
option in an association, you can not save the model.
Other question there is more documentation about MOFScript. I can only
find the user manual.
Thank you in advance!!
Javier Jimenez
|
|
|
|
|
Re: [MOFScript] Navigable Asociation [message #608256 is a reply to message #380334] |
Wed, 14 November 2007 08:47 |
Eclipse User |
|
|
|
Originally posted by: javjimgon.alum.us.es
Gøran K. Olsen escribió:
> Hello Javier,
>
> Considering UML.
>
> I have seen different implementations of this so it depends on how your
> model is created.
>
> Using e.g. a model created in Papyrus UML or IBM RSM you traverse your
> ownedAttributes and checks if association !null.
>
> texttransformation NewTrans(in uml:"http://www.eclipse.org/uml2/2.1.0/UML")
> {
> uml.Class::main () {
> stdout.println("Class Name: " + self.name)
> self.ownedAttribute->forEach(p:uml.Property | p.association!=null){
> stdout.println("Navigable Association: " + p.name)
> stdout.println("Navigable AssociationType: " + p.type.name)
> }
> }
> }
>
> on:
> class_0
> Class_1 ------------>Class_0
>
> Gives output:
> Class Name: Class_0
> Class Name: Class_1
> Navigable Association: class_0
> Navigable AssociationType: Class_0
>
>
> /Gøran
>
>
> "Javier Jimenez" <javjimgon@alum.us.es> wrote in message
> news:fgurvs$938$1@build.eclipse.org...
>> Hello,
>>
>> I would like to know when a end association isNavigable. On order to
>> generate an attribute only in the class which is in the navigable end of
>> the association.
>>
>> Thank you in advance!!
>> Javier Jimenez
>
>
Hello Gøran,
thanks for your answer. Finally it was a problem of the UML editor that
I use (Topcased). There is a bug and when you tick the 'isNavigable'
option in an association, you can not save the model.
Other question there is more documentation about MOFScript. I can only
find the user manual.
Thank you in advance!!
Javier Jimenez
|
|
|
|
Powered by
FUDForum. Page generated in 0.02888 seconds