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

Bug 545407

Summary: Gestures do not support scene changes
Product: [Tools] GEF Reporter: Camille Letavernier <cletavernier>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: matthias.wienand
Version: 5.0.100   
Target Milestone: 5.1.0 (2019-06)   
Hardware: All   
OS: All   
See Also: https://github.com/eclipse/gef/pull/58
Whiteboard:

Description Camille Letavernier CLA 2019-03-14 09:56:42 EDT
GEF Gestures check the current scene on activation, assuming that 1) it is already set and 2) it will never change

This causes issues in at least the following cases:

- Some JavaFX Controls (Such as BorderPane) use a Skin which is only rendered during the first Pulse, meaning that children of a BorderPane aren't attached to the scene until that initial Pulse. As a consequence, we can't use a BorderPane as the parent for a GEF Viewer's canvas (At least not without some custom asynchronous initialization)
- When using a JavaFX-Eclipse application (Via an E(fx)clipse E4 Application), detaching/reparenting Parts may change the Part's scene. If that Part contains a GEF Viewer, Gestures will stop working because they won't receive events from the new scene
- It prevents loading a GEF Viewer in the background (Detached from any scene)
Comment 1 Camille Letavernier CLA 2019-03-14 10:02:02 EDT
I should be able to propose a patch today
Comment 2 Matthias Wienand CLA 2019-03-15 11:16:40 EDT
Resolving as fixed for 5.1.0 (2019-06) as the corresponding pull request has been merged. Thank you for your contribution!
Comment 3 Camille Letavernier CLA 2019-03-15 11:25:55 EDT
Thanks, Matthias!