How can I close all projects in an Eclipse workspace while eclipse is closed?
Right click on one of the open projects ---> Close unrelated projects.
It closes all projects except that one.
I have not found the piece of metadata that says whether or not a project is closed, I suspect it is not possible through that route as I have grepped through the files created and not found one.
I have 2 workarounds, the first of which is:
Close Eclipse.
Rename the .project file in the top level of each project (painful to do manually if you have a lot, you could write a script).
Start Eclipse.
Projects should show up as closed.
Note: to undo this you will have to revert the name changes (ie turn them all back to .project files) before you try to open them.
The advantages of this approach is that you can work at getting one project behaving at a time (if this is appropriate for your needs).
The other approach is to simply create a new workspace, get that set up correctly (whatever it is you need - VCS, correct JRE, Target Platform etc) and then import each of your projects 1 (or more) at a time.
This could be more work, depending on how customised your workspace gets (perspective layouts, preferences, code templates etc), however this would give you a clean slate. This might be best if things are truly that bad.
Note: basing all this on 3.7.1