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