Bug 495465

Summary: Consider dropping the V-parameter of IVisualPart (and all related classes).
Product: [Tools] GEF Reporter: Alexander Nyßen <nyssen>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 0.2.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Alexander Nyßen CLA 2016-06-04 08:40:09 EDT
In addition to the VR-parameter that refers the the visual root (Node in case of JavaFX), IVisualPart also defines a V-parameter that refers to the concrete visual. This is problematic in two situations:

- When a Group is wrapped around the 'actual' visual, to include effect, etc. in the layout bounds, the 'actual' visual is not accessible without casting, so no benefit is brought by the V-parameter
- As the V-parameter fixes the return type of the createVisual() and getVisual() methods, and further is used within doRefreshVisual(V), subclasses cannot exchange the visualization of their superclasses.

We should thus consider dropping the V parameter and using VR in all places where V is currently used. We should also consider to remove the input parameter from doRefreshVisual(V) completely (the visual can be easily accessed from the respective getter, so there is no need to pass it in).