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

Bug 369117

Summary: [Table] Drag and drop failing (NPE in refreshDelayed)
Product: z_Archived Reporter: Gregoire Dupe <gdupe>
Component: EMF-FacetAssignee: Project Inbox <emft.facet-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 CC: nicolas.bros
Version: unspecifiedFlags: gdupe: juno+
gdupe: kepler+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 366367    
Attachments:
Description Flags
NPE in EcoreEditor$5.isReadOnly
gdupe: iplog-
My.ecore (test file) gdupe: iplog-

Description Gregoire Dupe CLA 2012-01-19 12:20:54 EST
When I try to drag an element from the model browser and drop it to the table I get the following error.

version: head of the trunk.

eclipse.buildId=I20111209-1447
java.version=1.6.0_29
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_FR
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data C:\gdupe\workspaces\emffacet_20101125_1903_runtime3 -dev file:C:/gdupe/workspaces/emffacet_20101125_1903/.metadata/.plugins/org.eclipse.pde.core/_runtime3/dev.properties -debug C:\gdupe\workspaces\emffacet_20101125_1903\.metadata\.plugins\org.eclipse.pde.core\_runtime3/.options -os win32 -ws win32 -arch x86 -consoleLog

Error
Thu Jan 19 18:17:12 CET 2012
Unhandled event loop exception

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4300)
	at org.eclipse.swt.SWT.error(SWT.java:4215)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
Caused by: java.lang.NullPointerException
	at org.eclipse.emf.facet.widgets.table.ui.internal.TableWidgetController.refreshDelayed(TableWidgetController.java:1902)
	at org.eclipse.emf.facet.widgets.table.ui.internal.TableWidgetController$3$1.run(TableWidgetController.java:313)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	... 23 more
Comment 1 Nicolas Bros CLA 2012-01-20 06:14:50 EST
Created attachment 209803 [details]
NPE in EcoreEditor$5.isReadOnly

I have a NPE too when I try to drag&drop, but it's a different one (see attached stacktrace).
Comment 2 Nicolas Bros CLA 2012-01-20 06:19:57 EST
Created attachment 209804 [details]
My.ecore (test file)

To reproduce:
- open the attached ecore file with the "sample ecore model editor"
- right click on the "abc" EPackage and select "View in a table (0.2)"
- try to drag&drop the "Test" class to the table view