Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » zooming support endless loop
zooming support endless loop [message #70371] Fri, 14 March 2003 14:15 Go to next message
Eclipse UserFriend
Originally posted by: Raymond_Tsui.ca.ibm.co

Randy Can you look at the attached stack trace?

I'm trying to add zoom support and followed the logic example to add a free
form editpart to do so. It works great some of the time but other times, the
code gets into an endless loop after a change in zoom. I suspended the
program in the middle of one of these loops. Can you look at the stack trace
and see if that looks about right?

How would you diagnose this problem?

Ray



  • Attachment: Clipboard.jpg
    (Size: 93.18KB, Downloaded 162 times)
Re: zooming support endless loop [message #70414 is a reply to message #70371] Fri, 14 March 2003 15:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Do you have a FlowLayout set as the Layout for a Freeform layer? This
doesn't work, only FreeformXYLayout works. The reason is that a freeform
figure can extend in all directions, as needed by the location of its
children. So, the top-left corner of a freeform figure is a function of the
location of the children. But, with flowlayout, the locations of the
children are a function of the top-left corner of the container (the
freeform layer).

Do you currently allow the user to drag things into negative x or y
coordinates? Or, does you automatic layout ever place things in negative x
coordinates (for really large flows, perhaps). If not, you don't need
freeform anything.

"Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
news:b4so8a$h37$1@rogue.oti.com...
> Randy Can you look at the attached stack trace?
>
> I'm trying to add zoom support and followed the logic example to add a
free
> form editpart to do so. It works great some of the time but other times,
the
> code gets into an endless loop after a change in zoom. I suspended the
> program in the middle of one of these loops. Can you look at the stack
trace
> and see if that looks about right?
>
> How would you diagnose this problem?
>
> Ray
>
>
>
>
Re: zooming support endless loop [message #70564 is a reply to message #70414] Fri, 14 March 2003 17:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Raymond_Tsui.ca.ibm.co

Ahh, that could explain things. We *are* using FlowLayouts in the parent
part that has a FreeformLayer as its figure. But I'm not sure what to do
now.

I tried changing the figure to a regular Layer but then all the children
objects disappear. Why does it work in the case of a FreeformLayout and not
a regular Layout?

Thanks
Ray

"Randy Hudson" <none@us.ibm.com> wrote in message
news:b4sscm$l4m$1@rogue.oti.com...
> Do you have a FlowLayout set as the Layout for a Freeform layer? This
> doesn't work, only FreeformXYLayout works. The reason is that a freeform
> figure can extend in all directions, as needed by the location of its
> children. So, the top-left corner of a freeform figure is a function of
the
> location of the children. But, with flowlayout, the locations of the
> children are a function of the top-left corner of the container (the
> freeform layer).
>
> Do you currently allow the user to drag things into negative x or y
> coordinates? Or, does you automatic layout ever place things in negative
x
> coordinates (for really large flows, perhaps). If not, you don't need
> freeform anything.
>
> "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> news:b4so8a$h37$1@rogue.oti.com...
> > Randy Can you look at the attached stack trace?
> >
> > I'm trying to add zoom support and followed the logic example to add a
> free
> > form editpart to do so. It works great some of the time but other times,
> the
> > code gets into an endless loop after a change in zoom. I suspended the
> > program in the middle of one of these loops. Can you look at the stack
> trace
> > and see if that looks about right?
> >
> > How would you diagnose this problem?
> >
> > Ray
> >
> >
> >
> >
>
>
Re: zooming support endless loop [message #70582 is a reply to message #70564] Fri, 14 March 2003 17:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Raymond_Tsui.ca.ibm.co

Typos...the last sentence should read this way

Why does it work in the case of a FreeformLayer and not
a regular Layer?

"Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
news:b4t487$sb9$1@rogue.oti.com...
> Ahh, that could explain things. We *are* using FlowLayouts in the parent
> part that has a FreeformLayer as its figure. But I'm not sure what to do
> now.
>
> I tried changing the figure to a regular Layer but then all the children
> objects disappear. Why does it work in the case of a FreeformLayout and
not
> a regular Layout?
>
> Thanks
> Ray
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:b4sscm$l4m$1@rogue.oti.com...
> > Do you have a FlowLayout set as the Layout for a Freeform layer? This
> > doesn't work, only FreeformXYLayout works. The reason is that a
freeform
> > figure can extend in all directions, as needed by the location of its
> > children. So, the top-left corner of a freeform figure is a function of
> the
> > location of the children. But, with flowlayout, the locations of the
> > children are a function of the top-left corner of the container (the
> > freeform layer).
> >
> > Do you currently allow the user to drag things into negative x or y
> > coordinates? Or, does you automatic layout ever place things in
negative
> x
> > coordinates (for really large flows, perhaps). If not, you don't need
> > freeform anything.
> >
Re: zooming support endless loop [message #70632 is a reply to message #70582] Fri, 14 March 2003 20:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

If you look at the difference between XYLayout and FreeformXYLayout, you
will get an idea.
Basically, you want a FlowLayout which, instead of position children
relative to its getClientArea().getLocation(), you position them relative to
0,0, all the time.

But then this begs the question, why use Freeform at all? It sounds like
you are just using it for its Zoom support.

"Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
news:b4t4db$sha$1@rogue.oti.com...
> Typos...the last sentence should read this way
>
> Why does it work in the case of a FreeformLayer and not
> a regular Layer?
>
> "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> news:b4t487$sb9$1@rogue.oti.com...
> > Ahh, that could explain things. We *are* using FlowLayouts in the parent
> > part that has a FreeformLayer as its figure. But I'm not sure what to do
> > now.
> >
> > I tried changing the figure to a regular Layer but then all the children
> > objects disappear. Why does it work in the case of a FreeformLayout and
> not
> > a regular Layout?
> >
> > Thanks
> > Ray
> >
> > "Randy Hudson" <none@us.ibm.com> wrote in message
> > news:b4sscm$l4m$1@rogue.oti.com...
> > > Do you have a FlowLayout set as the Layout for a Freeform layer? This
> > > doesn't work, only FreeformXYLayout works. The reason is that a
> freeform
> > > figure can extend in all directions, as needed by the location of its
> > > children. So, the top-left corner of a freeform figure is a function
of
> > the
> > > location of the children. But, with flowlayout, the locations of the
> > > children are a function of the top-left corner of the container (the
> > > freeform layer).
> > >
> > > Do you currently allow the user to drag things into negative x or y
> > > coordinates? Or, does you automatic layout ever place things in
> negative
> > x
> > > coordinates (for really large flows, perhaps). If not, you don't need
> > > freeform anything.
> > >
>
>
Re: zooming support endless loop [message #70648 is a reply to message #70632] Fri, 14 March 2003 21:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Raymond_Tsui.ca.ibm.co

Zooming support is the whole reason I got into this mess in the first place
:-) We do need zooming support.

The way I added zooming support is to set the root edit part to be
ScaleableFreeformRootEditPart as per logic example. As I said, that was
enough to cause the infinite loops in our otherwise well behaved editor.

So if I can extropolate, I should then modify/subclass FlowLayout to force
the position of them to relative to 0,0????? That would be enough to solve
the problem? Please say yes :)

Ray

"Randy Hudson" <none@us.ibm.com> wrote in message
news:b4tfq7$65t$1@rogue.oti.com...
> If you look at the difference between XYLayout and FreeformXYLayout, you
> will get an idea.
> Basically, you want a FlowLayout which, instead of position children
> relative to its getClientArea().getLocation(), you position them relative
to
> 0,0, all the time.
>
> But then this begs the question, why use Freeform at all? It sounds like
> you are just using it for its Zoom support.
>
> "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> news:b4t4db$sha$1@rogue.oti.com...
> > Typos...the last sentence should read this way
> >
> > Why does it work in the case of a FreeformLayer and not
> > a regular Layer?
> >
> > "Ray Tsui" <Raymond_Tsui@ca.ibm.co> wrote in message
> > news:b4t487$sb9$1@rogue.oti.com...
> > > Ahh, that could explain things. We *are* using FlowLayouts in the
parent
> > > part that has a FreeformLayer as its figure. But I'm not sure what to
do
> > > now.
> > >
> > > I tried changing the figure to a regular Layer but then all the
children
> > > objects disappear. Why does it work in the case of a FreeformLayout
and
> > not
> > > a regular Layout?
> > >
> > > Thanks
> > > Ray
> > >
> > > "Randy Hudson" <none@us.ibm.com> wrote in message
> > > news:b4sscm$l4m$1@rogue.oti.com...
> > > > Do you have a FlowLayout set as the Layout for a Freeform layer?
This
> > > > doesn't work, only FreeformXYLayout works. The reason is that a
> > freeform
> > > > figure can extend in all directions, as needed by the location of
its
> > > > children. So, the top-left corner of a freeform figure is a
function
> of
> > > the
> > > > location of the children. But, with flowlayout, the locations of
the
> > > > children are a function of the top-left corner of the container (the
> > > > freeform layer).
> > > >
> > > > Do you currently allow the user to drag things into negative x or y
> > > > coordinates? Or, does you automatic layout ever place things in
> > negative
> > > x
> > > > coordinates (for really large flows, perhaps). If not, you don't
need
> > > > freeform anything.
> > > >
> >
> >
>
>
Re: zooming support endless loop [message #70663 is a reply to message #70648] Fri, 14 March 2003 21:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

yes?
Re: zooming support endless loop [message #196189 is a reply to message #70414] Fri, 16 September 2005 19:52 Go to previous messageGo to next message
Nick Allen is currently offline Nick AllenFriend
Messages: 23
Registered: July 2009
Junior Member
Randy Hudson wrote:
> Do you have a FlowLayout set as the Layout for a Freeform layer? This
> doesn't work, only FreeformXYLayout works. The reason is that a freeform
> figure can extend in all directions, as needed by the location of its
> children. So, the top-left corner of a freeform figure is a function of the
> location of the children. But, with flowlayout, the locations of the
> children are a function of the top-left corner of the container (the
> freeform layer).
>

I now have a similar problem. I am using FreeformLayout in a
FreeformLayer and the system goes into an endless loop when I try to
zoom. I believe since the previous post FreeformLayout has replaced
FreeformXYLayout, but I could be wrong.

By not setting the layout manager, I avoid this problem, but of course,
nothing is positioned properly within the diagram. I have tried also
using XYLayout, but I fall into the same endless loop.

Any thoughts?

Thanks
Nick
Re: zooming support endless loop [message #196226 is a reply to message #196189] Sat, 17 September 2005 00:01 Go to previous messageGo to next message
Nick Allen is currently offline Nick AllenFriend
Messages: 23
Registered: July 2009
Junior Member
> I now have a similar problem. I am using FreeformLayout in a
> FreeformLayer and the system goes into an endless loop when I try to
> zoom. I believe since the previous post FreeformLayout has replaced
> FreeformXYLayout, but I could be wrong.
>
> By not setting the layout manager, I avoid this problem, but of course,
> nothing is positioned properly within the diagram. I have tried also
> using XYLayout, but I fall into the same endless loop.

The problem only occurs when I have connections in my diagram. Any
other sort of figures work just fine with zoom.
Re: zooming support endless loop [message #196241 is a reply to message #196226] Sat, 17 September 2005 00:27 Go to previous messageGo to next message
Nick Allen is currently offline Nick AllenFriend
Messages: 23
Registered: July 2009
Junior Member
> The problem only occurs when I have connections in my diagram. Any
> other sort of figures work just fine with zoom.

I have found that it infinitely loops in the for loop of the
DeferredUpdateManager.validateFigures() method.
Re: zooming support endless loop [message #196249 is a reply to message #196226] Sat, 17 September 2005 00:33 Go to previous messageGo to next message
Nick Allen is currently offline Nick AllenFriend
Messages: 23
Registered: July 2009
Junior Member
and I am sure my answer lies in the following newsgroup thread...

subject: stuck in endless loop in DeferredUpdateManager
from: Jason Woods
date: 10/13/2003
Re: zooming support endless loop [message #196256 is a reply to message #196241] Sat, 17 September 2005 01:18 Go to previous message
Nick Allen is currently offline Nick AllenFriend
Messages: 23
Registered: July 2009
Junior Member
> I have found that it infinitely loops in the for loop of the
> DeferredUpdateManager.validateFigures() method.

It appears that it was caused by a buggy Locator that I had implemented.
I have found that RelativeLocator with the proper constant provides
the same function, so I have switched to using that.
Previous Topic:Editor positioning in Workspace
Next Topic:lightweightsystem initialization failing
Goto Forum:
  


Current Time: Thu Jan 02 13:41:01 GMT 2025

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

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

Back to the top