problems with connection [message #76149] |
Tue, 22 April 2003 04:09  |
Eclipse User |
|
|
|
Originally posted by: joerg.doblaski.gmx.de
Hello NG,
when I try to connect my figures the following happends:
I choose the connect-tool and move it to the figure. Then the
ConnectionCommand
is created by the getConnectionCreateCommand(), getSourceConnectionAnchor()
of
the EditPart is called and MyConnectionAnchor.getLocation() returns the
correct
location.
So far so good, but when I press the mousebutton, the connection is created
from
point(0,0) to (100, 100)! The method getLocation() of MyConnectionAnchor is
always
called with null.
I looked into the simple gef-examples and realized that when the mousebutton
is pressed the getLocation() of their anchor-class is called by
BendpointConnectionRouter. In my case, this never happends.
How can I solve this problem?
J
|
|
|
|
Re: problems with connection [message #76228 is a reply to message #76212] |
Tue, 22 April 2003 12:53  |
Eclipse User |
|
|
|
Originally posted by: joerg.doblaski.gmx.de
Hello Randy,
thanks, I found it out. I forgot to implement the interface NodeEditPart in
my EditPart
and so the method getLocation() of MyConnectionAnchor was never called by
the BendpointConnectionRouter.
"Randy Hudson" <none@us.ibm.com> schrieb im Newsbeitrag
news:b83olb$f9b$1@rogue.oti.com...
> There are 2 ways to obtain the source connection anchor (using the default
> NodeEditPart interface). One is during the tool interaction:
> ConnectionAnchor getSourceConnectionAnchor(Request request);
>
> The other is based on the model only (not a tool). This is the one called
> *after* the tools has finished. It is also called at startup when
> populating the viewer:
>
> ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart connection);
>
> it sounds like you aren't implementing the second.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04137 seconds