Bug 400960 - File->Close All or ctrl+shift+w fail to close all open documents
Summary: File->Close All or ctrl+shift+w fail to close all open documents
Status: CLOSED DUPLICATE of bug 413590
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.2.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.4 M3   Edit
Assignee: Eric Moffatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2013-02-15 14:51 EST by Yiming Sun CLA
Modified: 2014-03-31 15:08 EDT (History)
4 users (show)

See Also:


Attachments
eclipse log file (5.06 KB, text/plain)
2013-03-12 13:17 EDT, Yiming Sun CLA
no flags Details
a newer eclipse log file (210.29 KB, text/plain)
2013-04-05 09:59 EDT, Yiming Sun CLA
no flags Details
workbench.xmi (470.96 KB, application/xml)
2013-04-05 10:00 EDT, Yiming Sun CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yiming Sun CLA 2013-02-15 14:51:59 EST
Using the menu command "File->Close All" or the shortcut key ctrl-shift-w does not close all open documents.  Tried several times, but not sure if there is a pattern -- sometimes it leaves 4 documents open and other times it leaves 1.

It is worth noting that subsequent Close All commands will fail to close anything, including the documents that failed to be closed in the first place, or any newer documents opened since the first failed Close All command.

I am using 

Eclipse Java EE IDE for Web Developers.

Version: Juno Service Release 1
Build id: 20121004-1855

Windows 7 64bit Ultimate

Sun JDK 1.7.0_11
Comment 1 Brian de Alwis CLA 2013-02-19 09:39:22 EST
Sounds like an exception is being thrown behind the scenes.  Could you please attach your log file?

http://wiki.eclipse.org/FAQ_Where_can_I_find_that_elusive_.log_file%3F
Comment 2 Yiming Sun CLA 2013-02-19 11:06:29 EST
something was quite wrong with the installation I had and it wasn't even generating the .log file. The installation added several plugins, also upgraded to Juno SR1, and also a patch to improve the XML editor performance, and any of these could've messed up things.

I installed a fresh version of Juno SR1 and things seemed to be working fine.
Comment 3 Lars Vogel CLA 2013-02-19 11:07:52 EST
Thanks for the info. Closing as invalid in this case.
Comment 4 Yiming Sun CLA 2013-03-12 13:17:43 EDT
Created attachment 228291 [details]
eclipse log file
Comment 5 Yiming Sun CLA 2013-03-12 13:18:57 EDT
I am re-opening this bug.  After I performed a legit update via the Software Update (as opposed to the patch I installed earlier when I discovered the bug in the first place), the same symptom occurred.

More details:

Close All or ctrl-shift-w does not close all documents.  But right-click on any document tab and choose "Close all" from the pop-up menu works.

The .log does not generate any exceptions regarding the failure of close-all.  Attached is a .log

Version: Juno Service Release 2
Build id: 20130225-0426
Comment 6 Paul Webster CLA 2013-03-12 13:32:15 EDT

*** This bug has been marked as a duplicate of bug 394336 ***
Comment 7 Yiming Sun CLA 2013-03-12 16:05:20 EDT
I beg to differ but this is not a duplicate of 394336.  File->Close works on my eclipse, and it was never disabled.  But "close all" does not.
Comment 8 Paul Webster CLA 2013-03-12 16:28:02 EDT
Sorry about that, I'm still trying to replicate.
Comment 9 Yiming Sun CLA 2013-03-12 22:05:26 EDT
No problem and no need to apologize. This bug seems to take place after upgrading from Juno SR1 to Juno SR2.  I initially encountered this problem after having applied a patch to SR1 for Bug 394588, but later decided to get a fresh copy of SR1 without the patch and the close-all problem didn't happen for SR1 (see Comment 2 for this bug).

That patch was supposedly to be included with SR2.  I upgraded to SR2, and now the close-all bug showed up again (and pom editor switching still seemed to be slow, but this is a different matter).
Comment 10 Paul Webster CLA 2013-04-05 09:40:25 EDT
I've tested 4.2.2, and 4.2.1 upgraded to 4.2.2 (both with EGit, EMF SDK, and XText SDK installed) and I still can't reproduce the problem (opening some editors, clicking around, CTRL+ALT+W)

If you can still reproduce it, is there anything else left in your error log?  Also, could you attach your <workspace>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi file?

PW
Comment 11 Yiming Sun CLA 2013-04-05 09:59:56 EDT
Created attachment 229370 [details]
a newer eclipse log file
Comment 12 Yiming Sun CLA 2013-04-05 10:00:58 EDT
Created attachment 229371 [details]
workbench.xmi
Comment 13 Yiming Sun CLA 2013-04-05 10:11:08 EDT
Thank you fro looking into this.  I did a little more experiment and it seems the bug is related to the combination of v4.2.2 eclipse and the existing workspace (most likely from some plugins) -- sorry for not having thought of this earlier,  -- I switched to a new workspace and the bug no longer shows up.

I can fully understand if you decide to close this bug, however, I remain interested in knowing which plugin caused this.  The problem is, I have installed eclipse a few times since the initial discovery of the "bug", but not necessarily added all the plugins, so now I am just wondering what is a clean and easy way for me to remove the artifacts left by plugins.

The requested files are attached in case you still need them.
Comment 14 Dani Megert CLA 2013-04-22 06:14:41 EDT
(In reply to comment #10)
> I've tested 4.2.2, and 4.2.1 upgraded to 4.2.2 (both with EGit, EMF SDK, and
> XText SDK installed) and I still can't reproduce the problem (opening some
> editors, clicking around, CTRL+ALT+W)

I can also *not* reproduce the shortcut (or menu being disabled) problem using plain Eclipse SDK 4.2.2. But using N20130421-2000 I can easily reproduce the disabled menu (shortcut works fine). Steps are in bug 394336 comment 17.
Comment 15 Dani Megert CLA 2013-04-23 03:07:01 EDT
(In reply to comment #14)
> (In reply to comment #10)
> > I've tested 4.2.2, and 4.2.1 upgraded to 4.2.2 (both with EGit, EMF SDK, and
> > XText SDK installed) and I still can't reproduce the problem (opening some
> > editors, clicking around, CTRL+ALT+W)
> 
> I can also *not* reproduce the shortcut (or menu being disabled) problem
> using plain Eclipse SDK 4.2.2. But using N20130421-2000 I can easily
> reproduce the disabled menu (shortcut works fine). Steps are in bug 394336
> comment 17.

The disabled menu got fixed (at least for me) with the fix for bug 394336.
Comment 16 Dani Megert CLA 2013-07-24 05:38:07 EDT
See also bug 413590, which has steps.
Comment 17 Lars Vogel CLA 2014-03-31 15:08:13 EDT
(In reply to Yiming Sun from comment #13)
> Thank you fro looking into this.  I did a little more experiment and it
> seems the bug is related to the combination of v4.2.2 eclipse and the
> existing workspace (most likely from some plugins) -- sorry for not having
> thought of this earlier,  -- I switched to a new workspace and the bug no
> longer shows up.

I also tried to reproduce it and was not able to. I mark it as fixed as you also report that after switching to a new workspace this works for you. I think http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c1156eb060b87e108c78c67984d3b101f5bb14e6 fixed it, I therefore mark this bug as dub of Bug 413590.

*** This bug has been marked as a duplicate of bug 413590 ***