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

Bug 317149

Summary: NPE when adding a new Part to a Part Stack in Workbenchmodel Editor
Product: [Eclipse Project] e4 Reporter: Tomasz Zarna <tomasz.zarna>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: RESOLVED FIXED QA Contact: Prakash Rangaraj <prakash>
Severity: normal    
Priority: P3 CC: jhelming, Lars.Vogel
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tomasz Zarna CLA 2010-06-17 04:42:49 EDT
I20100510-1530

Steps:
1. Create e4 App Project using the "New..." wizard
2. Open Application.e4xmi with Workbenchmodel Editor
3. Switch to Windows, go down to Part Stack
4. The combo with "Part" and "InputPart" is initially empty. Press the button next to it
=>

java.lang.NullPointerException
at org.eclipse.emf.ecore.util.EcoreUtil.create(EcoreUtil.java:3247)
at org.eclipse.e4.tools.emf.ui.internal.common.component.PartStackEditor$6.widgetSelected(PartStackEditor.java:291)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2601)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2565)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2399)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:669)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:662)
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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

One need to select an option in the combo first.
Comment 1 Tomasz Zarna CLA 2010-06-17 07:42:34 EDT
Still valid in e4 1.0M6.
Comment 2 Jonas Helming CLA 2012-11-20 08:25:00 EST
I cannot reproduce this, suggest to close.
Comment 3 Lars Vogel CLA 2012-11-20 08:54:59 EST
Fixed in recent build.