Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319348

Summary: Children or BorderedNodeFigure are not repainted with default clipping strategy
Product: [Tools] GEF Reporter: Ansgar Radermacher <ansgar.radermacher>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: aboyko, yann.tanguy
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Ansgar Radermacher CLA 2010-07-09 04:39:47 EDT
Build Identifier: Build id: 20100617-1415

In case of a BorderedNodeFigure, the getBounds operation (which is used by Figure when no specific clipping strategy is used) returns the bounds of the mainFigure, i.e. the figure inside the BorderedNodeFigure. Elements of the border are not taken into acount by the paintChildren operation in class Figure. This caused bug 313985 in Papyrus, port labels that are outside a class are not repainted (it worked with older draw2d revisions).

A Draw2D application can fix the problem by using a clipping strategy returning the extended bounds. However, this is not straight forward, since a *parent* of a BorderedNodeFigure has to apply the clipping strategy and the parent might not in advance know that it contains a BorderedNodeFigure (well, it's mainly difficult, if -as in case of Papyrus- GMF generated and/or GMF runtime classes would have to change).

For applications, it would almost always (I can't think of a counter example) better, if a BorderedNodeFigure returns the extended bounds via the getBounds() operations. Application who are interested in the inner bounds can still call getMainFigure().getBounds(). Alternatively, the paintChildren operation in Figure could call the getExtendedBounds operation if the child is a BorderedNodeFigure.



Reproducible: Always
Comment 1 Alex Boyko CLA 2010-07-09 12:27:20 EDT
This is a GMF issue, not GEF and it's fixed already for 2.3.1

*** This bug has been marked as a duplicate of bug 319191 ***