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

Bug 450250

Summary: Parent visuals are drawn over children visuals.
Product: [Tools] GEF Reporter: Markus Muehlbrandt <markus.muehlbrandt>
Component: GEF MVCAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: 3.10.0 (Mars) M4   
Hardware: All   
OS: All   
Whiteboard:

Description Markus Muehlbrandt CLA 2014-11-06 06:04:01 EST
The visualizations are misordered, so that the parent visuals are drawn above any children visuals. This is due to the AbstractFXContentPart#addChildVisual() method not inserting content children visuals after the parent content visualization.
Comment 1 Alexander Nyßen CLA 2014-12-02 03:12:29 EST
Indeed, the default implementation is not very helpful in case the visual part uses a Parent (as its visual), in which it embeds certain own visuals, as well as its children (I think this was meant here). 

I changed the implementation to no longer provide this default behavior within AbstractFXContentPart. All clients are now responsible of adding/removing child visuals themselves. 

Furthermore I ensured  that within AbstractVisualPart and AbstractContentPart, all methods that are not to be implemented by clients in all possible cases (e.g. addChildVisual() is only called if children are present) are no longer provided as abstract but concrete operations, throwing an UnsupportedOperationException. This way, clients will not have to overwrite a lot of methods that are actually not used (which might cause harm if all those operations are by default overwritten with an empty implementation), while on the other side, a missing implementation is not silently ignored.

All changes pushed to origin/master. Resolving as fixed in 3.10.0M4.