How to connect multiplicities in a UML class diagram [message #235916] |
Mon, 18 June 2007 17:30 |
Eclipse User |
|
|
|
Originally posted by: arno.blouin.tele2.fr
Hi,
I want to be able to add an association between multiplicities in a UML class diagram:
I have a class <i>AssociationFigure</i> which extends <i>PolylineConnection</i>; in its constructor I add two multiplicities like this:
<i>
ConnectionEndpointLocator sourceEndpointLocator = new ConnectionEndpointLocator(this, false);
add(fromMultiplicity, sourceEndpointLocator);
ConnectionEndpointLocator targetEndpointLocator = new ConnectionEndpointLocator(this, true);
add(toMultiplicity, targetEndpointLocator);
</i>
Where <i>fromMultiplicity</i> and <i>toMultiplicity</i> are two <i>MultiplicityFigure</i> which extends <i>Figure</i>.
The problem with that method is that I cannot select a <i>multiplicityFigure</i> and I cannot create an association from/to a <i>multiplicityFigure.</i>
Someone can help me? (I'm newbie in GEF ;) )
|
|
|
Re: How to connect multiplicities in a UML class diagram [message #236048 is a reply to message #235916] |
Wed, 20 June 2007 14:02 |
Eclipse User |
|
|
|
Originally posted by: none.ibm.com
Connections are made between nodes. Your connections can also be nodes, by
making them targetable by the connection creation tool. The
GraphicalNodeEditPolicy is generally installed on the editpart that can be a
source/target of a connection, and it responds to targeting.
"Arnaud Blouin" <arno.blouin@tele2.fr> wrote in message
news:1053729186.3701182187842903.JavaMail.root@cp9.dzone.com...
> Hi,
> I want to be able to add an association between multiplicities in a UML
> class diagram:
> I have a class <i>AssociationFigure</i> which extends
> <i>PolylineConnection</i>; in its constructor I add two multiplicities
> like this:
> <i>
> ConnectionEndpointLocator sourceEndpointLocator = new
> ConnectionEndpointLocator(this, false);
> add(fromMultiplicity, sourceEndpointLocator);
>
> ConnectionEndpointLocator targetEndpointLocator = new
> ConnectionEndpointLocator(this, true);
> add(toMultiplicity, targetEndpointLocator);
> </i>
>
> Where <i>fromMultiplicity</i> and <i>toMultiplicity</i> are two
> <i>MultiplicityFigure</i> which extends <i>Figure</i>.
>
> The problem with that method is that I cannot select a
> <i>multiplicityFigure</i> and I cannot create an association from/to a
> <i>multiplicityFigure.</i>
>
> Someone can help me? (I'm newbie in GEF ;) )
|
|
|
Powered by
FUDForum. Page generated in 0.02765 seconds