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

Bug 478398

Summary: NPE when undoing after creating a connection using the hover handle within the Logo Example.
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: 0.2.0   
Target Milestone: 4.0.0 / 3.11.0 (Neon) M2   
Hardware: All   
OS: All   
Whiteboard:

Description Matthias Wienand CLA 2015-09-25 05:53:27 EDT
Within the MVC Logo Example, a NPE is thrown upon undo after a connection was created using a hover handle. It seems like the connection is removed and afterwards gets manipulated.
Comment 1 Matthias Wienand CLA 2015-09-25 09:39:03 EDT
When pressing the "+" hover handle, an execution transaction is opened. The creation operation and the bending operation (used to move the end point of the connection with the pointer location) are both executed within that same transaction. Therefore, undoing would undo the creation first, and after that try to undo the bending, which would result in an NPE. I fixed the issue by closing and re-opening the execution transaction after creating the curve, i.e. two separate undo steps are now necessary, the first of which undoes the bending and the second undoes the creation. The code is published on the master branch. Therefore, I resolve this ticket as fixed for 3.11.0M2.