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

Bug 334009

Summary: Adding native DND ability to GraphViewer produces "Widget is disposed" exception
Product: [Tools] GEF Reporter: Johan Schulz <schulz.johan>
Component: GEF-Legacy ZestAssignee: gef-inbox <gef-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: irbull, steeg
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Stacktrace when shutting down the workbench none

Description Johan Schulz CLA 2011-01-11 12:45:47 EST
Build Identifier: 20100917-0705

I use the GraphViewer in an Eclipse view, if i add native DND support to the GraphViewer with 
 addDragSupport( DND.DROP_MOVE, new Transfer[] { TextTransfer.getInstance() }, myDragListener ))

It crashes if i shutdown the Workbench, DND itself works fine as long as the Workbench is running.

The checkWidget() call in Widget.removeListener throws an NPE for the display when the controlListener is removed in DragSource.onDispose same with DropTarget.

Regards
Johan

@see 
http://www.eclipse.org/forums/index.php?t=msg&goto=638209&S=ff54adcc25aa910bb032e24fcbd6ae9c







Reproducible: Always

Steps to Reproduce:
1. Create ViewPart with GraphViewer
2. Add DND support over addDragSupport (drag mode or transfer type doesn't matter)
3. Close the Workbench
Comment 1 Johan Schulz CLA 2011-01-11 13:02:27 EST
Created attachment 186535 [details]
Stacktrace when shutting down the workbench
Comment 2 Fabian Steeg CLA 2011-01-11 13:47:13 EST
Thanks for the report Johan.

I added a test to verify this issue has been fixed in HEAD by the recent fix for bug 200732 (see GraphViewerTests#testDisposalWithDragSource in org.eclipse.gef/test/org.eclipse.zest.tests).

*** This bug has been marked as a duplicate of bug 200732 ***