Skip to main content



      Home
Home » Eclipse Projects » GEF » How to connect multiplicities in a UML class diagram
How to connect multiplicities in a UML class diagram [message #235916] Mon, 18 June 2007 13:30 Go to next message
Eclipse UserFriend
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 10:02 Go to previous message
Eclipse UserFriend
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 ;) )
Previous Topic:Error in running Hellogef demos on Eclipse 3.2 n GEF 3.2
Next Topic:It is indirectly referenced from .class in eclipse
Goto Forum:
  


Current Time: Wed Jul 23 21:11:29 EDT 2025

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

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

Back to the top