GEF Shapes example : connections don't stick to moving figure [message #163385] |
Mon, 10 January 2005 11:20 |
Eclipse User |
|
|
|
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 18:49 |
Pratik Shah Messages: 1077 Registered: July 2009 |
Senior Member |
|
|
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 22:20 |
Sapna George Messages: 76 Registered: July 2009 |
Member |
|
|
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
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03292 seconds