Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359043 - Drag and Drop broken in Ecore Model Editor - NPE
Summary: Drag and Drop broken in Ecore Model Editor - NPE
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Edit (show other bugs)
Version: 2.7.1   Edit
Hardware: PC Windows 7
: P3 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 359756 361542 362543 368608 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-27 07:53 EDT by CLA
Modified: 2012-01-15 01:33 EST (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CLA 2011-09-27 07:53:09 EDT
Since EMF 2.7.1 I can no longer drag and drop in the Ecore Model Editor.

eclipse.buildId=M20110909-1335
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Framework arguments:  -showlocation
Command-line arguments:  -os win32 -ws win32 -arch x86 -data /projekts/code/archi/workspace -showlocation

Error
Tue Sep 27 12:48:24 BST 2011
Unhandled event loop exception

java.lang.NullPointerException
	at org.eclipse.emf.ecore.impl.EClassImpl.getFeatureID(EClassImpl.java:1466)
	at org.eclipse.emf.ecore.util.BasicExtendedMetaData.getAffiliation(BasicExtendedMetaData.java:1339)
	at org.eclipse.emf.edit.command.SetCommand.prepare(SetCommand.java:525)
	at org.eclipse.emf.common.command.AbstractCommand.canExecute(AbstractCommand.java:114)
	at org.eclipse.emf.edit.command.AbstractOverrideableCommand.doCanExecute(AbstractOverrideableCommand.java:120)
	at org.eclipse.emf.edit.command.AbstractOverrideableCommand.canExecute(AbstractOverrideableCommand.java:113)
	at org.eclipse.emf.edit.command.DragAndDropCommand.prepareDropLinkOn(DragAndDropCommand.java:801)
	at org.eclipse.emf.edit.command.DragAndDropCommand.prepareDropOn(DragAndDropCommand.java:707)
	at org.eclipse.emf.edit.command.DragAndDropCommand.prepare(DragAndDropCommand.java:307)
	at org.eclipse.emf.common.command.AbstractCommand.canExecute(AbstractCommand.java:114)
	at org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter.helper(EditingDomainViewerDropAdapter.java:324)
	at org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter.dragEnter(EditingDomainViewerDropAdapter.java:143)
	at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:60)
	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:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.swt.dnd.DropTarget.DragEnter(DropTarget.java:297)
	at org.eclipse.swt.dnd.DropTarget$3.method3(DropTarget.java:243)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback3(COMObject.java:92)
	at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method)
	at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:363)
	at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:289)
	at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:172)
	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.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Ed Merks CLA 2011-10-03 17:32:19 EDT
*** Bug 359756 has been marked as a duplicate of this bug. ***
Comment 2 Christopher Brind CLA 2011-10-04 12:29:02 EDT
We get the same thing - even after regenerating all our code.
Comment 3 Ed Merks CLA 2011-10-20 09:34:05 EDT
*** Bug 361542 has been marked as a duplicate of this bug. ***
Comment 4 Miles Parker CLA 2011-10-21 19:25:44 EDT
Not to be a pain, but any hints about when a fix w/ nightly build might be available? (I just ask because I can't seem to get my build system to use 2.7.0.)
Comment 5 Christopher Brind CLA 2011-10-21 19:44:07 EDT
(In reply to comment #4)
> Not to be a pain, but any hints about when a fix w/ nightly build might be
> available? (I just ask because I can't seem to get my build system to use
> 2.7.0.)

Yeah, we had the same problem.  Luckily someone on our team hadn't updated (me) so I ended up copying my Eclipse install to the rest of the team.

However, for the build of our RCP product, we just went through the dependencies and changed the minimum version to 2.7.0 inclusive and maximum to 2.7.1 *exclusive*.

This is a real pain though!
Comment 6 Miles Parker CLA 2011-10-21 20:54:11 EDT
(In reply to comment #5)
> However, for the build of our RCP product, we just went through the
> dependencies and changed the minimum version to 2.7.0 inclusive and maximum to
> 2.7.1 *exclusive*.

Yeah, I tried that, but Buckminster chokes because for some reason it thinks it can't find the older version. There's probably a setting hidden somewhere for that.. <sigh> Did you guys have to change anything on your build / P2 side?
Comment 7 Christopher Brind CLA 2011-10-22 06:26:30 EDT
(In reply to comment #6)
> (In reply to comment #5)
> > However, for the build of our RCP product, we just went through the
> > dependencies and changed the minimum version to 2.7.0 inclusive and maximum to
> > 2.7.1 *exclusive*.
> 
> Yeah, I tried that, but Buckminster chokes because for some reason it thinks it
> can't find the older version. There's probably a setting hidden somewhere for
> that.. <sigh> Did you guys have to change anything on your build / P2 side?

We use Tycho and it magically (thankfully) just worked.
Comment 8 Ed Merks CLA 2011-10-25 02:56:16 EDT
The fix is committed for 2.7.1 and 2.8.0.  Builds for both will hopefully happen later this week.
Comment 9 Ed Merks CLA 2011-10-25 02:56:36 EDT
Marking as resolve.
Comment 10 Ed Merks CLA 2011-11-01 04:26:35 EDT
*** Bug 362543 has been marked as a duplicate of this bug. ***
Comment 11 Miles Parker CLA 2011-11-17 20:18:07 EST
Ed, where are these updates hosted? I tried the http://download.eclipse.org/modeling/emf/updates/.. sites, but those are wildly out of data so they must have moved.. Indigo site only has the 0913 build, of course.
Comment 12 Philipp W. Kutter CLA 2011-11-18 02:42:49 EST
Miles.
I recently asked about the problem in the newsgroup, and Ed Willink pointed me to the place with the dail update sites.

You should find the messages.

Regards, Philipp

(In reply to comment #11)
> Ed, where are these updates hosted? I tried the
> http://download.eclipse.org/modeling/emf/updates/.. sites, but those are wildly
> out of data so they must have moved.. Indigo site only has the 0913 build, of
> course.
Comment 13 Ed Merks CLA 2011-11-18 03:17:59 EST
There's the aggregate

http://downloads.eclipse.org/modeling/updates 

and the subsites interim, milestones, and releases.
Comment 14 Miles Parker CLA 2011-11-18 13:07:58 EST
(In reply to comment #13)
> http://downloads.eclipse.org/modeling/updates 

I think you mean.. http://download.eclipse.org/modeling/updates but P2 doesn't like that or http://download.eclipse.org/modeling/updates/milestones either. Ed W.s solution is to grab the update site which should work, but of course it would be better to have this from a P2 site for automated builds. See also bug 364186. I can't remember if there is an automated build on Hudson, or perhaps that is waiting for the git transition, etc..
Comment 15 Ed Willink CLA 2011-11-18 14:32:49 EST
The fix was in M3 so

http://download.eclipse.org/releases/staging

should do.
Comment 16 Miles Parker CLA 2011-11-18 15:35:50 EST
Thanks Ed(s). We need the fixed 2.7.1 build, really, unless perhaps 2.8.0 M3 is quite stable. I'm thinking it could be in Indigo SR2 staging, but I'm not sure such a beastie exists.
Comment 17 Ed Willink CLA 2011-11-18 17:02:53 EST
(In reply to comment #16)
> We need the fixed 2.7.1 build

Try http://download.eclipse.org/modeling/emf/emf/updates/2.7.x
Comment 18 Kenn Hussey CLA 2011-11-18 17:42:17 EST
(In reply to comment #17)
> (In reply to comment #16)
> > We need the fixed 2.7.1 build

The 2.7.1 release is in the 2.7 site (http://download.eclipse.org/modeling/emf/emf/updates/2.7) and also in the general EMF release site (http://download.eclipse.org/modeling/emf/emf/updates) which is also included in the modeling site (http://www.eclipse.org/modeling/updates).

> 
> Try http://download.eclipse.org/modeling/emf/emf/updates/2.7.x

Maintenance builds towards 2.7.2 are found here, as Ed has suggested.
Comment 19 Kenn Hussey CLA 2011-11-18 17:46:10 EST
(In reply to comment #13)
> There's the aggregate
> 
> http://downloads.eclipse.org/modeling/updates 
> 
> and the subsites interim, milestones, and releases.

Note that the composites need to be updated to pick up interim and milestone builds for more recent EMF releases (i.e., 2.7.2 and 2.8). Will attach a patch to bug 314388 shortly.
Comment 20 Miles Parker CLA 2011-11-21 14:20:44 EST
(In reply to comment #17)
> (In reply to comment #16)
> > We need the fixed 2.7.1 build
> 
> Try http://download.eclipse.org/modeling/emf/emf/updates/2.7.x

Funny, I though you meant as in: "http://download.eclipse.org/modeling/emf/emf/updates/2.7.2", but it is in fact literally "2.7.x". An interesting example of the ambiguity of human conventions vs. code.

In any case, that works perfectly, thanks all. A request that when there is a release version available at a permanent site that someone updates this bug with that info.
Comment 21 Ed Merks CLA 2011-11-22 05:26:47 EST
The changes are available in builds.
Comment 22 Arnaud Lucien CLA 2011-12-16 11:24:23 EST
Thanks it work great. Is there a minor release planned before SR2 ?
Comment 23 Ed Merks CLA 2012-01-15 01:33:15 EST
*** Bug 368608 has been marked as a duplicate of this bug. ***