Skip to main content



      Home
Home » Eclipse Projects » GEF » Infinite Loop
Infinite Loop [message #129604] Wed, 28 April 2004 18:51 Go to next message
Eclipse UserFriend
Originally posted by: chris.gaudi.freeserve.co.uk

My GEF based application seems to be dissapearing into an infinte layout
loop because of the way I am doing my figures....

My figures and layout hierarchy are as follows:

DiagramFigure - uses GraphLayoutManager (ripped off from Activity Flow
example)
+ child 0 = Label
+ child 1 = Label (connected to child 0 by simple connection edit part)
+ child 2 = SubgraphFigure (ripped off again)
+ header = MyOwnFigure (Flow layout: minorspacing=50) extends Figure
+ my own figure contains Label, Ellipse and
PolylineConnection (anchored by Chopbox to the other figures in my own
figure)
+ content = Figure
+ footer = Label
+ child 3 = Label (connected to child 2 by simple connection edit part)

However it seems the graph layout is getting stuck in an infinite loop
because as it lays out MyOwnFigure as part of the graph for child 2; it
causes the PolylineConnection under header to get moved invalidating the
layout and causing the layout to happen again.

Are there any limitations to what can be in the figure for an edit part, or
is this something wierd to do with the graph layout I ripped off from the
Activity Flow example?

Any hints much appreciated...

- Chris
Re: Infinite Loop [message #129613 is a reply to message #129604] Wed, 28 April 2004 19:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chris.gaudi.freeserve.co.uk

Sorry - a correction (bit more detail) to what I was saying....

"Chris Senior" <chris@gaudi.freeserve.co.uk> wrote in message
news:c6pc5p$da3$1@eclipse.org...

> However it seems the graph layout is getting stuck in an infinite loop
> because as it lays out MyOwnFigure as part of the graph for child 2; it
> causes the PolylineConnection under header to get moved invalidating the
> layout and causing the layout to happen again.

What I mean is the Label and/or Ellipse inside MyOwnFigure seem to get moved
during the layout - this (somehow?) moves the ChopboxAnchors I have attached
to them - and so it seems to be the anchor calling fireMoved(?) that causes
it all to get laid out again, and again, and again.... etc.

Should the anchors just fire "moved" only if it REALLY moves (i.e. the
location X,Y changes, not just gets set somehow?).

Or is it something more fundamental than that which I am doing wrong?

> Any hints much appreciated...
>
> - Chris
>
>
Re: Infinite Loop [message #129642 is a reply to message #129604] Thu, 29 April 2004 04:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chris.gaudi.demon.co.uk

Sorry if this is turning into more of a blog than a news post...

> My GEF based application seems to be dissapearing into an infinte layout
> loop because of the way I am doing my figures....

Seems to be related to using the graph layout from the flow example. I
simplified my code to use plain old FlowLayout and now it all works fine
(actually it looks slightly better!!). So it must be related to the
compound directed graph based layout algorithm - maybe one day I will
ivestigate what was going on.

- Chris
Re: Infinite Loop [message #129684 is a reply to message #129642] Thu, 29 April 2004 10:51 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I didn't really read your post, but maybe it was
https://bugs.eclipse.org/bugs/show_bug.cgi?id=45759.

"Chris Senior" <chris@gaudi.demon.co.uk> wrote in message
news:c6qe36$b3p$1@eclipse.org...
> Sorry if this is turning into more of a blog than a news post...
>
> > My GEF based application seems to be dissapearing into an infinte layout
> > loop because of the way I am doing my figures....
>
> Seems to be related to using the graph layout from the flow example. I
> simplified my code to use plain old FlowLayout and now it all works fine
> (actually it looks slightly better!!). So it must be related to the
> compound directed graph based layout algorithm - maybe one day I will
> ivestigate what was going on.
>
> - Chris
>
>
Re: Infinite Loop [message #129690 is a reply to message #129604] Thu, 29 April 2004 10:14 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

A stack trace would help. Pause the main thread, and copy the stack trace
using the context menu.
Previous Topic:Constraint solver that interacts with GEF editors?
Next Topic:Filters in GEF
Goto Forum:
  


Current Time: Thu May 08 16:20:09 EDT 2025

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

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

Back to the top