Skip to main content



      Home
Home » Eclipse Projects » GEF » GEF Shapes example : connections don't stick to moving figure
GEF Shapes example : connections don't stick to moving figure [message #163385] Mon, 10 January 2005 06:20 Go to next message
Eclipse UserFriend
Originally posted by: erwin.de.ley.tuple.be

Hi,

When playing with the Shapes example, I noticed that when you move a shape
with at least 2 incoming connections (where the shape is target), only one
connection moves along.

With the logic example this works fine, so I wanted to find out what's
causing this, in order to get to learn GEF repaint mechanisms.

While debugging, I notice that the non-moving connections still have the
moved figure as target, and that target still has all connections in its
list of targetconnections. So the static structure is fine, it must be
something with the listeners/anchors/...

As I don't understand these mechanisms completely (anchors, helpers etc),
anybody out there that can identify the problem?

Cheers

Erwin
Re: GEF Shapes example : connections don't stick to moving figure [message #163453 is a reply to message #163385] Mon, 10 January 2005 13:49 Go to previous messageGo to next message
Eclipse UserFriend
It's a known problem. I'll look into it.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=73968

"erwin" <erwin.de.ley@tuple.be> wrote in message
news:crtoe0$97i$1@www.eclipse.org...
> Hi,
>
> When playing with the Shapes example, I noticed that when you move a shape
> with at least 2 incoming connections (where the shape is target), only one
> connection moves along.
>
> With the logic example this works fine, so I wanted to find out what's
> causing this, in order to get to learn GEF repaint mechanisms.
>
> While debugging, I notice that the non-moving connections still have the
> moved figure as target, and that target still has all connections in its
> list of targetconnections. So the static structure is fine, it must be
> something with the listeners/anchors/...
>
> As I don't understand these mechanisms completely (anchors, helpers etc),
> anybody out there that can identify the problem?
>
> Cheers
>
> Erwin
>
>
>
Re: GEF Shapes example : connections don't stick to moving figure [message #164487 is a reply to message #163385] Tue, 18 January 2005 17:20 Go to previous message
Eclipse UserFriend
I saw the same problem. I fixed it by changing the Anchors on the
ShapeEditPart as:

public ConnectionAnchor getSourceConnectionAnchor(ConnectionEditPart
connection) {
return new TopAnchor(getFigure());
}

/*
* (non-Javadoc)
* @see
org.eclipse.gef.NodeEditPart#getSourceConnectionAnchor(org.e clipse.gef.Reque
st)
*/
public ConnectionAnchor getSourceConnectionAnchor(Request request) {
return new TopAnchor(getFigure());
}

/*
* (non-Javadoc)
* @see
org.eclipse.gef.NodeEditPart#getTargetConnectionAnchor(org.e clipse.gef.Conne
ctionEditPart)
*/
public ConnectionAnchor getTargetConnectionAnchor(ConnectionEditPart
connection) {
return new BottomAnchor(getFigure());
}

/*
* (non-Javadoc)
* @see
org.eclipse.gef.NodeEditPart#getTargetConnectionAnchor(org.e clipse.gef.Reque
st)
*/
public ConnectionAnchor getTargetConnectionAnchor(Request request) {
return new BottomAnchor(getFigure());
}

TopAnchor and BottomAnchor is the same as those in the Schema Editor
example.

Worked like a charm!


"erwin" <erwin.de.ley@tuple.be> wrote in message
news:crtoe0$97i$1@www.eclipse.org...
> Hi,
>
> When playing with the Shapes example, I noticed that when you move a shape
> with at least 2 incoming connections (where the shape is target), only one
> connection moves along.
>
> With the logic example this works fine, so I wanted to find out what's
> causing this, in order to get to learn GEF repaint mechanisms.
>
> While debugging, I notice that the non-moving connections still have the
> moved figure as target, and that target still has all connections in its
> list of targetconnections. So the static structure is fine, it must be
> something with the listeners/anchors/...
>
> As I don't understand these mechanisms completely (anchors, helpers etc),
> anybody out there that can identify the problem?
>
> Cheers
>
> Erwin
>
>
>
Previous Topic:RCP and GEF: Cannot open editor
Next Topic:Installing SnapFeedbackPolicy on an EditPart
Goto Forum:
  


Current Time: Sat Jul 05 03:59:19 EDT 2025

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

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

Back to the top