You should subclass from AbstractConnectionAnchor and override the
getLocation(Point reference). Use the reference point to intersect with the
triangle polygon to return a point on the triangle.
Take a look at the geometry class (org.eclipse.draw2d.geometry) for how to
do an intersection calculation. GMF also has some geometry extensions that
might be of interest. (org.eclipse.gmf.runtime.draw2d.ui.geometry).
"Martin" <email@example.com> wrote in message
> Hello there,
> i need a connectionanchor for a triangle-figure in my gef editor. when i
> use chopboxanchor, the connection ends at a rectangle around my
> i know, that i need a custom connectionanchor, but i dont know, how to do
> i hope you know what i mean..
> regards Martin
I have a figure that has 8 different possible anchor points. Currently
everything works fine if I try to reconnect with a different figure, but
if I just try to change the connection to a different anchor point
within the same figure, the resulting behavior is equivalent to have
selected an invalid target: the connection gets back to the original
I'm not getting any run-time error. Seems that there is a "policy" or
something similar that is not allowing me to reconnect with the same
Does any body have had the same problem? Any idea?
Check if the command created for this reconnection request by
GraphicalNodeEditPolicy or you own derived from GraphicalNodeEditPolicy
returns an executable command. If yes, check that the command is properly
executed, model is updated and you properly refresh the editparts for the
fired event. But to me it sounds more like the command created by edit
pplicies is not executable. Even if the command created by your
GraphicalNodeEditPolicy is executable just make sure other edit policy
don't create unexecutable commands for this "reconnect" request.
Hope this helps.
Hi. I hope that help me because its important for me. I am trying to
connecto two figures but when i click on the target figure, the line
connection desappear. I cant connecto two figures. WHY?? please help me,
its too necesary for me. Help me.