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

Bug 331377

Summary: Ecore Tools to not work in e4
Product: [Eclipse Project] e4 Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, Mike_Wilson, pwebster, remy.suen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 333589, 354875, 358204, 359117    
Bug Blocks: 330957    

Description Lars Vogel CLA 2010-11-29 15:02:00 EST
Please install the Ecore tools in e4 as described here: http://www.vogella.de/articles/EclipseEMF/article.html#emfinstallation

Follow then the creation of an EMF model via the Ecore tools (should only take 5 minutes): http://www.vogella.de/articles/EclipseEMF/article.html#createmodel

Delete on part from the diagram, via right mouse menu-> remove from model -> you receive a SWTException.

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:4091)
at org.eclipse.swt.SWT.error(SWT.java:4006)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4059)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3678)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$6.run(PartRenderingEngine.java:783)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:692)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:104)
at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:524)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
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:621)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:576)
at org.eclipse.equinox.launcher.Main.run(Main.java:1409)
at org.eclipse.equinox.launcher.Main.main(Main.java:1385)
Caused by: java.lang.NullPointerException
at org.eclipse.emf.ecoretools.diagram.edit.policies.EcoreBaseItemSemanticEditPolicy.addDestroyShortcutsCommand(EcoreBaseItemSemanticEditPolicy.java:351)
at org.eclipse.emf.ecoretools.diagram.edit.policies.EClassItemSemanticEditPolicy.getDestroyElementCommand(EClassItemSemanticEditPolicy.java:64)
at org.eclipse.emf.ecoretools.diagram.edit.policies.EcoreBaseItemSemanticEditPolicy.getSemanticCommandSwitch(EcoreBaseItemSemanticEditPolicy.java:184)
at org.eclipse.emf.ecoretools.diagram.edit.policies.EcoreBaseItemSemanticEditPolicy.getSemanticCommand(EcoreBaseItemSemanticEditPolicy.java:124)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy.getCommand(SemanticEditPolicy.java:69)
at org.eclipse.emf.ecoretools.diagram.edit.policies.EcoreBaseItemSemanticEditPolicy.getCommand(EcoreBaseItemSemanticEditPolicy.java:106)
at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:501)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$1(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$1.run(GraphicalEditPart.java:482)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.getCommand(GraphicalEditPart.java:477)
at org.eclipse.emf.ecoretools.diagram.part.DeleteElementAction.getCommand(DeleteElementAction.java:84)
at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.getCommand(DiagramAction.java:161)
at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.calculateEnabled(DiagramAction.java:124)
at org.eclipse.gmf.runtime.diagram.ui.actions.DiagramAction.refresh(DiagramAction.java:114)
at org.eclipse.gmf.runtime.common.ui.action.AbstractActionHandler.selectionChanged(AbstractActionHandler.java:387)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:269)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:247)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
... 24 more
Comment 1 Paul Webster CLA 2010-11-30 08:29:01 EST
Lars,

are you testing org.eclipse.emf.ecoretools_0.10.0.v20100615-1639 with 4.1 M3?

PW
Comment 2 Remy Suen CLA 2010-11-30 08:41:05 EST
I used the Indigo site but was unable to complete step 3.2 because the 'Ecore Diagram' wizard is not in my list.
Comment 3 Remy Suen CLA 2010-11-30 09:04:03 EST
I'd get the code myself but can't seem to find the GMF code. The (now defunct?) sources seems to indicate it's in /cvsroot/modeling but I don't see any org.eclipse.gmf/ modules there.
Comment 4 Remy Suen CLA 2010-11-30 09:16:10 EST
(In reply to comment #3)
> The (now defunct?)
> sources seems to indicate it's in /cvsroot/modeling but I don't see any
> org.eclipse.gmf/ modules there.

Looks like they're in org.eclipse.gmp/ now. Will poke in there...
Comment 5 Lars Vogel CLA 2010-11-30 12:31:27 EST
Paul,

I'm using Eclipse 4.1 M3 with  Ecore Tools Utilities (Incubation)	0.10.0.v20100601-1628.

Hope this helps, Lars
Comment 6 Remy Suen CLA 2010-11-30 13:57:25 EST
(In reply to comment #5)
> I'm using Eclipse 4.1 M3 with  Ecore Tools Utilities (Incubation)   
> 0.10.0.v20100601-1628.

I don't see this on the Galileo, Helios, or Indigo sites.

Which update site should I use? ._.
Comment 7 Paul Webster CLA 2010-11-30 14:00:09 EST
(In reply to comment #6)
> I don't see this on the Galileo, Helios, or Indigo sites.
> 
> Which update site should I use? ._.

Install the ECore Tools SDK ... I got it from Indigo

PW
Comment 8 Paul Webster CLA 2010-11-30 15:09:58 EST
The Ecore Diagram wizard doesn't show up in the current I builds because of 1) the OSGi changes + 2) the fixing of batik.

org.apache.batik.util=1.6.0.v200805290154
org.apache.batik.util=1.6.0.v201011041432
org.apache.batik.util.gui=1.6.0.v200805290154
org.apache.batik.util.gui=1.6.0.v201011041432
org.apache.batik.util.gui.source=1.6.0.v200805290154
org.apache.batik.util.source=1.6.0.v200805290154

The v201011041432 version is incompatible with v200805290154, and ecoretools/gmf depend on a lot of batik plugins that need the v200805290154 version.

PW
Comment 9 Remy Suen CLA 2010-11-30 15:27:09 EST
(In reply to comment #8)
> The Ecore Diagram wizard doesn't show up in the current I builds because of 1)
> the OSGi changes + 2) the fixing of batik.

I have opened bug 331471 against Ecore Tools for this.
Comment 10 Remy Suen CLA 2011-01-05 12:47:37 EST
The EditPart that the DeleteElementAction gets is an EClassEditPart on 4.x but is an EPackageEditPart in the 3.x case.
Comment 11 Remy Suen CLA 2011-01-05 13:34:26 EST
Thanks for the report, Lars, I have corrected bug 333589.
Comment 12 Lars Vogel CLA 2012-09-03 09:22:12 EDT
I think this one is closed in Eclipse 4.2