Skip to main content



      Home
Home » Modeling » UML2 Tools » Association Owner Package
Association Owner Package [message #602197] Thu, 05 July 2007 09:31
Eclipse UserFriend
Hi,

I'm stuck with an issue about the package that will own the association.
When editing a class diagram and creating an association between a class
and a shortcuted class from another package, the association will always
go in the package of the "target" class.

I's very troublesome for several reasons:

-the first is that the association will simply disappear from the
diagram on refresh.

-2nd is when defining a shared or composite associations, and
furthermore a navigable association, it's best to store the association
with the "source" class. UML2 does it for the methode
createAssociation() of Class,
but I found in AssociationCreateCommand doDefaultElementCreation()

Type sourceType = (Type) getSource();
Type targetType = (Type) getTarget();
//due to association end conventiontions (see AssociationEndConvention)
//we need to have member end of type SourceType to be the first one created
//thus, we are calling UML2 createAssociation() in opposite order
boolean setNavigability =
getCreateRequest().getParameter(AssociationEditHelper.PARAME TER_SET_TARGET_NAVIGABILITY)
!= null;
Association result = targetType.createAssociation(false,
AggregationKind.NONE_LITERAL, "src", 1, 1, sourceType, setNavigability,
AggregationKind.NONE_LITERAL, "dst", 1, 1);


I think that this workaround didn't take the owner package of the
association into account.
In addition making this like this is equivalent to pollute the package
or the model from which the shortcut comes with associations that won't
have any semantic value in it.

Regards
Philippe
Previous Topic:interaction with editor
Next Topic:Re: UML2 XMI > SVG via XSLT
Goto Forum:
  


Current Time: Sun Jul 06 09:11:48 EDT 2025

Powered by FUDForum. Page generated in 0.05486 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top