Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Adding DropAdapter causes Widge is Disposed error
Adding DropAdapter causes Widge is Disposed error [message #638207] Wed, 10 November 2010 13:59
William Koscho is currently offline William Koscho
Messages: 10
Registered: May 2010
Junior Member
Hi Everyone,

I'm trying to add drag and drop support from a TreeViewer to a GraphViewer (which uses zest).

I have a GraphViewPart that contains the GraphViewer, and inside the GraphViewPart I add DropSupport to the GraphViewer using the following line:

m_graphViewer.addDropSupport(ops, dropTransfers, new MyDropAdapter(m_graphViewer));

The MyDropAdapter class just extends ViewerDropAdapter and contains a bunch of System.out statements to show me what is happening.

The problem happens when I close the application, it generates the stack trace below. If I comment out the line above, and don't add DropSupport, then I don't see the exception. After digging thru the eclipse code it seems like the Display == null where the exception is happening. Since the application is closing, does that make sense? If so, why would I be still getting this exception?

org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4083)
	at org.eclipse.swt.SWT.error(SWT.java:3998)
	at org.eclipse.swt.SWT.error(SWT.java:3969)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340)
	at org.eclipse.swt.widgets.Widget.removeListener(Widget.java:921)
	at org.eclipse.swt.dnd.DropTarget.onDispose(DropTarget.java:560)
	at org.eclipse.swt.dnd.DropTarget$2.handleEvent(DropTarget.java:157)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:808)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:446)
	at org.eclipse.swt.dnd.DropTarget$1.handleEvent(DropTarget.java:149)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:808)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:872)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:811)
	at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:872)
	at org.eclipse.swt.widgets.Widget.release(Widget.java:811)
	at org.eclipse.swt.widgets.Widget.dispose(Widget.java:446)
	at org.eclipse.ui.internal.PartPane.dispose(PartPane.java:180)
	at org.eclipse.ui.internal.ViewPane.dispose(ViewPane.java:193)
	at org.eclipse.ui.internal.WorkbenchPartReference.dispose(WorkbenchPartReference.java:681)
	at org.eclipse.ui.internal.WorkbenchPage.disposePart(WorkbenchPage.java:1721)
	at org.eclipse.ui.internal.WorkbenchPage.partRemoved(WorkbenchPage.java:1713)
....snip....

Thanks in advance,
Bill
Previous Topic:PDE Headless build
Next Topic:Adding DropAdapter causes Widge is Disposed error
Goto Forum:
  


Current Time: Sun Oct 26 06:59:13 GMT 2014

Powered by FUDForum. Page generated in 0.01592 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software