Home » Modeling » GMF (Graphical Modeling Framework) » Cannot resize down editparts
Cannot resize down editparts [message #482592] |
Thu, 27 August 2009 03:51  |
Eclipse User |
|
|
|
Hello,
I currently face a strange behaviour in GMF diagrams.
In fact, I cannot resize down my Nodes on my Diagrams, even when it is not
set to its minimal size.
A workaround I found while manipulating the diagram is that I have to
enlarge the node, to be able to shrink it just after. I looked in Eclipse
logs, and anything is ever logged (no message nor exceptions)
Have you already heard about such behaviour ?
Thanks in advance,
Best regards,
Maxence
|
|
|
Re: Cannot resize down editparts [message #482820 is a reply to message #482592] |
Fri, 28 August 2009 04:55   |
Eclipse User |
|
|
|
Hello,
Here are some additional information about this issue.
In fact, the issue seems to come from the draw2D Figures management...
In my generated code, I have an EditPart that relies on an EditPartFigure
(which is a Rounded Rectangle extension in fact).
When I change the size of my EditPart, the validate() method of the
DiagramEditPart.BorderItemsAwareFreeFormLayer class is called, which
implies this object and all its children to be validated recursively. Now,
this validation process leads to the resizing of the Figure, only when the
Figure that is being validated is not valid before entering this validate
method.
Moreover, I remarked that my EditPartFigure is set as a child of a
DefaultSizeNodeFigure, and when I try to enlarge the RoundedRectangle,
this DefaultSizeNodeFigure is not valid before being validated. This
causes the Figure.layout() method to be called and my RoundedRectangle to
be resized. Otherwise, when I try to shrink the RoundedRectangle, the
DefalutSizeNodeFigure is said to be already valid before being validated,
and this causes the RoundedRectangle not to be shrunk. (This can also
explain the fact that the Rectangle can be shrunk only when the Rectangle
has been enlarged previously)...
Unfortunately, I don't know why the DefaultSizeNodeFigure is invalidated
when it is asked to be enlarged, and already valid when asked to be
shrunk, but this is the only difference I could report in the two
behaviours.
Now, I don't know how I could investigate more, and how I could set a
workaround for this issue, since the problem seems to come from draw2d,
and since the trouble-maker object it not directly the generated
EditPartFigure.
So, I really look forward to having news and information about this issue,
so I can fix the behaviour of my Diagram.
Of course I can provide more details if needed.
Thanks a lot in advance,
Best regards,
Maxence
|
|
| |
Re: Cannot resize down editparts [message #485782 is a reply to message #482820] |
Mon, 14 September 2009 18:27   |
Eclipse User |
|
|
|
I'm also facing the same problem, and for a long time.
So +1
Thanks
Maxence Vanbesien escreveu:
> Hello,
> Here are some additional information about this issue.
>
> In fact, the issue seems to come from the draw2D Figures management...
>
> In my generated code, I have an EditPart that relies on an
> EditPartFigure (which is a Rounded Rectangle extension in fact).
>
> When I change the size of my EditPart, the validate() method of the
> DiagramEditPart.BorderItemsAwareFreeFormLayer class is called, which
> implies this object and all its children to be validated recursively.
> Now, this validation process leads to the resizing of the Figure, only
> when the Figure that is being validated is not valid before entering
> this validate method.
>
> Moreover, I remarked that my EditPartFigure is set as a child of a
> DefaultSizeNodeFigure, and when I try to enlarge the RoundedRectangle,
> this DefaultSizeNodeFigure is not valid before being validated. This
> causes the Figure.layout() method to be called and my RoundedRectangle
> to be resized. Otherwise, when I try to shrink the RoundedRectangle, the
> DefalutSizeNodeFigure is said to be already valid before being
> validated, and this causes the RoundedRectangle not to be shrunk. (This
> can also explain the fact that the Rectangle can be shrunk only when the
> Rectangle has been enlarged previously)...
>
> Unfortunately, I don't know why the DefaultSizeNodeFigure is invalidated
> when it is asked to be enlarged, and already valid when asked to be
> shrunk, but this is the only difference I could report in the two
> behaviours.
>
> Now, I don't know how I could investigate more, and how I could set a
> workaround for this issue, since the problem seems to come from draw2d,
> and since the trouble-maker object it not directly the generated
> EditPartFigure.
>
> So, I really look forward to having news and information about this
> issue, so I can fix the behaviour of my Diagram.
> Of course I can provide more details if needed.
>
> Thanks a lot in advance,
> Best regards,
> Maxence
>
|
|
| | | | |
Goto Forum:
Current Time: Mon Jul 14 08:00:46 EDT 2025
Powered by FUDForum. Page generated in 0.04889 seconds
|