I finally have aggregation working correctly for both UML1.4 and UML2

Aggregation can be changed using the property panels or right click
anywhere on the association edge

There are 3 methods for setting an aggregation

setAggregation(associationEnd, agg)

Always set the aggregation on the given associationEnd no matter what
UML version. This is used by the property panels as the panels always
want to directly reflect the UML model.

setAggregation1(associationEnd, agg)
Set the aggregation on the associationEnd assuming UML1.4 meaning
where the aggregation is set on the container end.
When called in UML2 mode the aggregation will in fact be applied to
the opposite end.

Much of our old code that is designed for UML1.4 is using this method.

setAggregation2(associationEnd, agg)
Set the aggregation on the associationEnd assuming UML2 meaning where
the aggregation is set on the contained end.
When called in UML1.4 mode the aggregation will in fact be applied to
the opposite end.

The new code for setting aggregation from the rightclick on the
association edge uses this.


In time I should think we would be moving to UML2 standard and
dropping the UML1.4 version but we need to deprecate.

Similarly for the getter
getAggregation(associationEnd)
getAggregation1(associationEnd)
getAggregation2(associationEnd)

Regards

Bob

On 25 March 2011 12:28, Bob Tarling <[email protected]> wrote:
> Some of the work in getting aggregation to work correctly for UML2 has
> broken it for UML1.4
>
> It used to act in reverse for UML2 but now acts in reverse for UML1.4
>
> What I will do for a better fix is to introduce a getAggregation2 and
> setAggregation2 method on the model interface
>
> For UML1.4 these method will internally swap the association end
> before reading or setting the aggregation and so simulate UML2 style
> there.
>
> For UML1.4 I'll change the methods getAggregation and setAggregation
> so that they swap around also and so simulate UML1.4 style there.
>
> Regards
>
> Bob
>

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2714180

To unsubscribe from this discussion, e-mail: 
[[email protected]].
To be allowed to post to the list contact the mailing list moderator, email: 
[[email protected]]

Reply via email to