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

Bug 331768

Summary: [Compatibility] Unpersistable editors outside the shared area in an active perspective are not closed on shutdown
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 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Persistable editor handling patch v1
none
Workbench patch v1 none

Description Remy Suen CLA 2010-12-03 09:26:32 EST
1. File > New > Untitled Text File
2. Drag it outside the shared area
3. Window > Open Perspective > Debug
4. Shutdown.
5. Restart
6. Window > Open Perspective > Java
7. The editor is there (it should have been closed) with an error.
Comment 1 Remy Suen CLA 2010-12-03 10:16:12 EST
Created attachment 184471 [details]
Persistable editor handling patch v1

We have code in various places that checks that we ignore calls to parts that cannot be seen by the user. In this case, we need to go around this way of thinking and "forcibly" close the editor.
Comment 2 Remy Suen CLA 2010-12-03 10:16:49 EST
Fixed in CVS HEAD.
Comment 3 Remy Suen CLA 2010-12-07 11:00:30 EST
Getting ConcurrentModificationExceptions when trying to restart with an unpersistable editor in an inactive perspective.

java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
at java.util.AbstractList$Itr.next(Unknown Source)
at org.eclipse.ui.internal.Workbench$12.run(Workbench.java:994)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:986)
at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:944)
at org.eclipse.ui.internal.Workbench$15.run(Workbench.java:1107)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1105)
at org.eclipse.ui.internal.Workbench.close(Workbench.java:1078)
at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:1101)
at org.eclipse.ui.internal.WorkbenchWindow.access$9(WorkbenchWindow.java:1083)
at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1130)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:1128)
at org.eclipse.ui.internal.WorkbenchWindow$4.close(WorkbenchWindow.java:433)
at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$8.shellClosed(WBWRenderer.java:433)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)
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.Decorations.closeWidget(Decorations.java:308)
at org.eclipse.swt.widgets.Shell.close(Shell.java:537)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.stop(PartRenderingEngine.java:874)
at org.eclipse.ui.internal.Workbench.restart(Workbench.java:2181)
at org.eclipse.ui.internal.handlers.RestartWorkbenchHandler.execute(RestartWorkbenchHandler.java:31)
Comment 4 Remy Suen CLA 2010-12-08 08:24:05 EST
Created attachment 184782 [details]
Workbench patch v1
Comment 5 Remy Suen CLA 2010-12-08 08:25:30 EST
(In reply to comment #4)
> Created an attachment (id=184782) [details]
> Workbench patch v1

Patch released to CVS HEAD.
Comment 6 Remy Suen CLA 2010-12-09 08:11:02 EST
Verified with I20101209-0255 on Windows XP.