bug in NullConnectionRouter/AbstractRouter [message #77748] |
Fri, 02 May 2003 15:21  |
Eclipse User |
|
|
|
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. To reproduce this,=20
create connection 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> </DIV>
<DIV><FONT face=3DArial size=3D2>---<BR> public void =
route(Connection conn)=20
{<BR> PointList points =3D=20
conn.getPoints();<BR> points.removeAllPoints(); <BR>  =
;Point=20
p;<BR> conn.translateToRelative(p =3D getStartPoint(conn));=20
<BR> points.addPoint(p);<BR> conn.translateToRelati=
ve(p =3D=20
getEndPoint(conn));<BR> points.addPoint(p); <BR> con=
n.setPoints(points);<BR> }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>and =
AbstractRouter.getStartPoint</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>protected Point =
getStartPoint(Connection conn)=20
{<BR> Point ref =3D=20
conn.getTargetAnchor().getReferencePoint();<BR> return=20
conn.getSourceAnchor().getLocation(ref);<BR>}<BR>---</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>getCopy in any place does help, =
I'm not sure=20
which 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 13:33  |
Eclipse User |
|
|
|
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. This is a bug. 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> </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" <<A=20
href=3D"mailto:kpaliy@aaanet.ru">kpaliy@aaanet.ru</A>> 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. To reproduce this,=20
create connection 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> </DIV>
<DIV><FONT face=3DArial size=3D2>---<BR> public void =
route(Connection conn)=20
{<BR> PointList points =3D=20
=
conn.getPoints();<BR> points.removeAllPoints(); <BR>  =
;Point=20
p;<BR> conn.translateToRelative(p =3D getStartPoint(conn)); =
=
<BR> points.addPoint(p);<BR> conn.translateToRelati=
ve(p=20
=3D=20
=
getEndPoint(conn));<BR> points.addPoint(p); <BR> con=
n.setPoints(points);<BR> }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>and =
AbstractRouter.getStartPoint</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>---</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>protected Point =
getStartPoint(Connection conn)=20
{<BR> Point ref =3D=20
conn.getTargetAnchor().getReferencePoint();<BR> return=20
conn.getSourceAnchor().getLocation(ref);<BR>}<BR>---</FONT ></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>getCopy in any place does help, =
I'm not sure=20
which one is better.</FONT></DIV></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_006F_01C31241.B5E19560--
|
|
|
Powered by
FUDForum. Page generated in 0.03345 seconds