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

Bug 518893

Summary: TypeStrokeGesture passes null IViewer to the IHandlerResolver
Product: [Tools] GEF Reporter: Matthias Wienand <matthias.wienand>
Component: GEF MVCAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.1.0   
Target Milestone: 5.0.1 (Oxygen.1) RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2017-06-28 10:35:09 EDT
When TypeStrokeGesture receives a keyboard event that does not target a Node controlled by / contained within an IViewer, it passes null as the IViewer to the IHandlerResolver. Instead, it should not process such events.

The DefaultHandlerResolver uses the IViewer that is given to it for accessing the IDomain, therefore throwing a NullPointerException if that IViewer is null.
Comment 1 Matthias Wienand CLA 2017-08-10 03:29:05 EDT
I added a null-check for the target viewer to TypeStrokeGesture in order to prevent delegation of events that occurred outside of the viewer to the handler resolver. Therefore, keyboard interaction in non-viewer-controlled JavaFX visuals does no longer trigger a NullPointerException within the DefaultHandlerResolver, because those events are no longer processed by the handler resolver.

The code is published on the master and R5_0_0_maintenance branches (as the changes are exclusively internal), therefore, I resolve this ticket as fixed for Oxygen.1 RC1.