Community
Participate
Working Groups
BorderedNodeFigure#layout() calls invalidateTree() and erase() regardless whether the bounds of the figure have changed or not. We need to look into the possibility of calling invalidateTree() if bounds have changed. Perhaps, we shouldn't even call invalidateTree() at all, since border item container acts as a free form figure now.
Created attachment 115068 [details] proposed patch Here is my final version of the patch-fix. Tested manually and with JUnits. Still need to call invalidateTree() such that border items of border items are re-layed out too (border items labels for example)
OK, we are good to commit this to 2.1.3 and 2.2.
Committed the fix for 2.1.3 and 2.2
The fix introduced a huge performance regression. So reopening to come up with a better fix.
Created attachment 120906 [details] proposed patch Moved invalidateTree() inside the if. Ensured that number of calls to #invalidate() and #layout() stayed the same as in 2.1 initially.
Hi Steve, if the new proposed patch looks good to you, I'll commit for 2.1.3. Thanks.
Patch looks good
Patch committed for 2.1.3 and 2.2
This solution breaks the show/hide target feedback mechanism to an extent. Our tool is setting the color of port figures to indicate compatibility while the user is creating a connector from another port. The show/hide feedback mechanism triggers the coloring changes. However, with this fix, it seems that the figure is not properly refreshing itself. Instead even though the color of the figure is set and the figure is re-validated, the coloring change does not always appear e.g. Sometimes selecting the edit part or its parent edit part, or moving the parent or itself will trigger the figure coloring to start working... By reverting this fix, I confirmed that the figure refreshing problem disappears, and coloring works consistently again.
My previous comments should be ignored for this bug. This fix has simply identified another problem which had, to this point, gone unnoticed. I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=264587 to track this issue.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug