Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » bug in NullConnectionRouter/AbstractRouter
bug in NullConnectionRouter/AbstractRouter [message #77748] Fri, 02 May 2003 19:21 Go to next message
Kirill Paliy is currently offline Kirill PaliyFriend
Messages: 25
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C31101.95B6CAD0
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

I just encountered strange behaviour of connection feedback, looks like =
a bug. To reproduce this, create connection with source anchor =3D=3D =
XYAnchor and scroll window to the bottom and/or right. Connection =
feedback looks pretty strange - source is far below the bottom window =
edge and goes further and further if I simply move cursor. I think the =
reason is inconsistency between NullConnectionRouter.route

---
public void route(Connection conn) {
PointList points =3D conn.getPoints();
points.removeAllPoints();
Point p;
conn.translateToRelative(p =3D getStartPoint(conn));=20
points.addPoint(p);
conn.translateToRelative(p =3D getEndPoint(conn));
points.addPoint(p);
conn.setPoints(points);
}
---

and AbstractRouter.getStartPoint

---
protected Point getStartPoint(Connection conn) {
Point ref =3D conn.getTargetAnchor().getReferencePoint();
return conn.getSourceAnchor().getLocation(ref);
}
---

getCopy in any place does help, I'm not sure which one is better.
------=_NextPart_000_0008_01C31101.95B6CAD0
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dkoi8-r">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I just encountered strange behaviour of =
connection=20
feedback, looks like a bug.&nbsp;To reproduce this,=20
create&nbsp;connection&nbsp;with source anchor =3D=3D XYAnchor and =
scroll window to=20
the bottom and/or right. Connection feedback looks pretty strange - =
source is=20
far below the bottom window edge and goes further and further if I =
simply move=20
cursor. I think the reason is inconsistency between=20
NullConnectionRouter.route</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>---<BR>&nbsp;public void =
route(Connection conn)=20
{<BR>&nbsp;&nbsp;PointList points =3D=20
conn.getPoints();<BR>&nbsp;&nbsp;points.removeAllPoints(); <BR>&nbsp;&nbsp=
;Point=20
p;<BR>&nbsp;&nbsp;conn.translateToRelative(p =3D getStartPoint(conn));=20
<BR>&nbsp;&nbsp;points.addPoint(p);<BR>&nbsp;&nbsp;conn.translateToRelati=
ve(p =3D=20
getEndPoint(conn));<BR>&nbsp;&nbsp;points.addPoint(p); <BR>&nbsp;&nbsp;con=
n.setPoints(points);<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and =
AbstractRouter.getStartPoint</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>protected Point =
getStartPoint(Connection conn)=20
{<BR>&nbsp;Point ref =3D=20
conn.getTargetAnchor().getReferencePoint();<BR>&nbsp;return=20
conn.getSourceAnchor().getLocation(ref);<BR>}<BR>---</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>getCopy in any&nbsp;place does help, =
I'm not sure=20
which&nbsp;one is better.</FONT></DIV></BODY></HTML>

------=_NextPart_000_0008_01C31101.95B6CAD0--
Re: bug in NullConnectionRouter/AbstractRouter [message #77814 is a reply to message #77748] Sun, 04 May 2003 17:33 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

This is a multi-part message in MIME format.

------=_NextPart_000_006F_01C31241.B5E19560
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

The router is not supposed to modify the point returned in =
getTargetAnchor. This is a bug. A workaround would be to return a copy =
each time in getLocation(), but this will not be necessary once fixed.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D37201

"Kirill Paliy" <kpaliy@aaanet.ru> wrote in message =
news:b8ugfk$bk5$1@rogue.oti.com...
I just encountered strange behaviour of connection feedback, looks =
like a bug. To reproduce this, create connection with source anchor =
=3D=3D XYAnchor and scroll window to the bottom and/or right. Connection =
feedback looks pretty strange - source is far below the bottom window =
edge and goes further and further if I simply move cursor. I think the =
reason is inconsistency between NullConnectionRouter.route

---
public void route(Connection conn) {
PointList points =3D conn.getPoints();
points.removeAllPoints();
Point p;
conn.translateToRelative(p =3D getStartPoint(conn));=20
points.addPoint(p);
conn.translateToRelative(p =3D getEndPoint(conn));
points.addPoint(p);
conn.setPoints(points);
}
---

and AbstractRouter.getStartPoint

---
protected Point getStartPoint(Connection conn) {
Point ref =3D conn.getTargetAnchor().getReferencePoint();
return conn.getSourceAnchor().getLocation(ref);
}
---

getCopy in any place does help, I'm not sure which one is better.

------=_NextPart_000_006F_01C31241.B5E19560
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dkoi8-r">
<META content=3D"MSHTML 6.00.2723.2500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>The router is not supposed to modify =
the point=20
returned in getTargetAnchor.&nbsp;This is a bug.&nbsp; A workaround =
would be to=20
return a copy each time in getLocation(), but this will not be necessary =
once=20
fixed.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"https://bugs.eclipse.org/bugs/show_bug.cgi?id=3D37201">https://bu=
gs.eclipse.org/bugs/show_bug.cgi?id=3D37201</A></FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Kirill Paliy" &lt;<A=20
href=3D"mailto:kpaliy@aaanet.ru">kpaliy@aaanet.ru</A>&gt; wrote in =
message <A=20
=
href=3D"news:b8ugfk$bk5$1@rogue.oti.com">news:b8ugfk$bk5$1@rogue.oti.com<=
/A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I just encountered strange behaviour =
of=20
connection feedback, looks like a bug.&nbsp;To reproduce this,=20
create&nbsp;connection&nbsp;with source anchor =3D=3D XYAnchor and =
scroll window=20
to the bottom and/or right. Connection feedback looks pretty strange - =
source=20
is far below the bottom window edge and goes further and further if I =
simply=20
move cursor. I think the reason is inconsistency between=20
NullConnectionRouter.route</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>---<BR>&nbsp;public void =
route(Connection conn)=20
{<BR>&nbsp;&nbsp;PointList points =3D=20
=
conn.getPoints();<BR>&nbsp;&nbsp;points.removeAllPoints(); <BR>&nbsp;&nbsp=
;Point=20
p;<BR>&nbsp;&nbsp;conn.translateToRelative(p =3D getStartPoint(conn)); =

=
<BR>&nbsp;&nbsp;points.addPoint(p);<BR>&nbsp;&nbsp;conn.translateToRelati=
ve(p=20
=3D=20
=
getEndPoint(conn));<BR>&nbsp;&nbsp;points.addPoint(p); <BR>&nbsp;&nbsp;con=
n.setPoints(points);<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>and =
AbstractRouter.getStartPoint</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>protected Point =
getStartPoint(Connection conn)=20
{<BR>&nbsp;Point ref =3D=20
conn.getTargetAnchor().getReferencePoint();<BR>&nbsp;return=20
conn.getSourceAnchor().getLocation(ref);<BR>}<BR>---</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>getCopy in any&nbsp;place does help, =
I'm not sure=20
which&nbsp;one is better.</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_006F_01C31241.B5E19560--
Previous Topic:finding Shell in GEF
Next Topic:Auto-sizing layouts?
Goto Forum:
  


Current Time: Sat Jul 27 13:29:03 GMT 2024

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

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

Back to the top