|
Re: Wrong depiction for binary association? [message #471704 is a reply to message #471703] |
Wed, 12 September 2007 14:38 |
Michael Golubev Messages: 383 Registered: July 2009 |
Senior Member |
|
|
Hello Andreas,
I don't think its a bug.
The end arrows denote the navigability of the end, and since the both propetries
are moved to the classifers, they are certainly navigable.
The org.eclipse.uml2.uml.internal.operations.PropertyOperations class defines
the isNavigable strictly according to the spec, that is:
public static boolean isNavigable(Property property) {
Association owningAssociation = property.getOwningAssociation();
return owningAssociation == null
? property.eGet(UMLPackage.Literals.ELEMENT__OWNER, false) instanceof
Classifier
: owningAssociation.getNavigableOwnedEnds().contains(property) ;
}
So, in the attached example, the decorations at the both ends are actually
expected.
Please note that in case if this arrow-ing behavior seems to be misleading,
you can switch it off via ClassDiagram preferences.
Regards,
Michael
> Hi,
>
> I am using binary associations, which I think are wrongly notated in
> the class diagram editor!?
>
> You can reproduce the scenario by creating two classes and a binary
> association between them. In the model you can move one association
> property referencing a class into the other one. Do the same with the
> other association property. The binary association is now displayed in
> the uml class diagram with open arrows at both ends, instead of
> leaving the arrows away!
>
> I created an example and attached it to this posting.
>
> Regards, Andreas
>
|
|
|
Re: Wrong depiction for binary association? [message #608033 is a reply to message #471703] |
Wed, 12 September 2007 14:38 |
Michael Golubev Messages: 383 Registered: July 2009 |
Senior Member |
|
|
Hello Andreas,
I don't think its a bug.
The end arrows denote the navigability of the end, and since the both propetries
are moved to the classifers, they are certainly navigable.
The org.eclipse.uml2.uml.internal.operations.PropertyOperations class defines
the isNavigable strictly according to the spec, that is:
public static boolean isNavigable(Property property) {
Association owningAssociation = property.getOwningAssociation();
return owningAssociation == null
? property.eGet(UMLPackage.Literals.ELEMENT__OWNER, false) instanceof
Classifier
: owningAssociation.getNavigableOwnedEnds().contains(property) ;
}
So, in the attached example, the decorations at the both ends are actually
expected.
Please note that in case if this arrow-ing behavior seems to be misleading,
you can switch it off via ClassDiagram preferences.
Regards,
Michael
> Hi,
>
> I am using binary associations, which I think are wrongly notated in
> the class diagram editor!?
>
> You can reproduce the scenario by creating two classes and a binary
> association between them. In the model you can move one association
> property referencing a class into the other one. Do the same with the
> other association property. The binary association is now displayed in
> the uml class diagram with open arrows at both ends, instead of
> leaving the arrows away!
>
> I created an example and attached it to this posting.
>
> Regards, Andreas
>
|
|
|
Powered by
FUDForum. Page generated in 0.02997 seconds