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 #638209] Wed, 10 November 2010 14:00 Go to next message
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
Re: Adding DropAdapter causes Widge is Disposed error [message #647916 is a reply to message #638209] Mon, 10 January 2011 13:04 Go to previous messageGo to next message
Johan Schulz is currently offline Johan Schulz
Messages: 20
Registered: November 2010
Junior Member
Did you find any solution for this problem? I have exactly the same problem with Helios and the current Zest version.

Regards
Johan
Re: Adding DropAdapter causes Widge is Disposed error [message #648206 is a reply to message #647916] Tue, 11 January 2011 19:03 Go to previous messageGo to next message
William Koscho is currently offline William Koscho
Messages: 10
Registered: May 2010
Junior Member
I never fixed this. I'm hoping someone else has fixed it and can share with us.

I dug through the eclipse code, but no luck.
Re: Adding DropAdapter causes Widge is Disposed error [message #648282 is a reply to message #648206] Wed, 12 January 2011 09:23 Go to previous message
Johan Schulz is currently offline Johan Schulz
Messages: 20
Registered: November 2010
Junior Member
It should be fixed in the current HEAD in cvs.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=334009
https://bugs.eclipse.org/bugs/show_bug.cgi?id=200732


Regards
Johan
Previous Topic:Multiple FileFieldEditors problem
Next Topic:Problem with contributing to Eclipse Search menu
Goto Forum:
  


Current Time: Sun Sep 21 08:14:44 GMT 2014

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

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