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

Bug 338953

Summary: [Compatibility] 'Close All' should always be enabled when editors are open
Product: [Eclipse Project] e4 Reporter: Grant Gayed <grant_gayed>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: remy.suen
Version: unspecified   
Target Milestone: 4.1 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
'Close All' patch v1 none

Description Grant Gayed CLA 2011-03-04 11:07:34 EST
- using I20110225-1300

- open two java editors
- File > Restart
- when the UI comes up again the two previously opened editors are auto-opened, but menu item File > Close All only becomes enabled when focus is given to an editor
  -> for File > Close this makes sense, but doesn't seem like it should be a requirement for File > Close All
Comment 1 Remy Suen CLA 2011-03-04 14:10:29 EST
While the scenario described in comment 0 has been fixed with the closing of bug 306952, this problem can still surface in 4.x because this handler seems to only be enabled when we have an active editor. This is no longer a valid assessment because we you have an editor opened but it is obscured by another part (hence there isn't an active editor).
Comment 2 Remy Suen CLA 2011-03-04 14:35:19 EST
Created attachment 190433 [details]
'Close All' patch v1

Change the XML <enabledWhen> expression to not refer to the 'activeEditor' variable and alter CloseAllHandler internally to check for editor references in the workbench page.
Comment 3 Remy Suen CLA 2011-03-04 14:37:42 EST
(In reply to comment #2)
> Created attachment 190433 [details]
> 'Close All' patch v1

Patch released to CVS HEAD.

Thanks for the bug report, Grant!
Comment 4 Remy Suen CLA 2011-03-08 11:45:44 EST
Verified with I20110307-2200 on Windows XP.