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

Bug 332461

Summary: [Compatibility] NPE thrown when restoring workbench with an editor in a detached window
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: 4.1 M5   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
PartSite patch v1 none

Description Remy Suen CLA 2010-12-13 13:29:50 EST
Caused by: java.lang.NullPointerException
	at org.eclipse.ui.internal.PartSite.getTopLevelModelWindow(PartSite.java:403)
	at org.eclipse.ui.internal.PartSite.setWindow(PartSite.java:200)
	at org.eclipse.ui.internal.PartSite.<init>(PartSite.java:177)
	at org.eclipse.ui.internal.EditorSite.<init>(EditorSite.java:44)
	at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:325)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:169)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
	at java.lang.reflect.Method.invoke(Method.java:600)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:52)
	... 57 more
Comment 1 Remy Suen CLA 2011-01-04 13:35:12 EST
Created attachment 186037 [details]
PartSite patch v1

Editors don't have placeholders so the code actually climbs up to the detached window instead of directly jumping up to the main workbench window.
Comment 2 Remy Suen CLA 2011-01-04 13:35:47 EST
(In reply to comment #1)
> Created attachment 186037 [details]
> PartSite patch v1

Patch released to CVS HEAD.
Comment 3 Remy Suen CLA 2011-01-26 08:50:28 EST
Verified with I20110125-2200 on Windows XP.