Flow layout problem in a compartment [message #547700] |
Mon, 19 July 2010 11:19 |
Eclipse User |
|
|
|
I have the same problem as
http://www.eclipse.org/forums/indexpaint.php?t=msg&goto= 211466& and
debugging a lot I think I found the problem.
I have 3 Figures that extends Widget: HBox, VBox and Button
+ HBox is a Figure that with a Container which has a vertical
FlowLayout an contains another Widget.
+ VBox is similar to HBox but has a horizontal FlowLayout.
+ Buttom is a non recursive Widget
I have no trouble adding anything to a HBox or to the first VBox but
when I add a VBox into a HBox an then I try to add a new Widget inside,
Eclipse stops responding. Debuggin a lot (really, a lot!) I found that
the problem is that when the new box is validated, it indicates the need
to validate his father. When the validate function ends, in some moment
GMF discovers that it needs to revalidate the parent of the new box and
when it is validated, calls the validate function on the new box, which
makes it enters an infinite loop (a loop that does not produce a stack
overflow exception because until the current validation is not
completed, the new iteration will not start).
This problem does not occur when using ToolbarLayout, for example. Like
John Yotka in the other thread, I followed the recipe GMF
(http://wiki.eclipse.org/GMF/Recipes), but I tried removing the layout
policy and the problem still occurs.
One detail I think is important is that the widget compartment of a new
HBox or VBox is too small to contain any widget, so when you add the
widget is necessary to increase the size of the box, which makes the box
be revalidated. The thing I do not understand is why this is repeated
infinitely.
I hope that with this information Alex Shatalin (or other) can solve
this strange problem.
Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.02351 seconds