Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 17: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 14: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:ToolEntry state
Next Topic:How can I configure an Plugin.xml file
Goto Forum:
  


Current Time: Fri Aug 12 13:14:14 GMT 2022

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

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

Back to the top