Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I close all projects in an Eclipse workspace while eclipse is closed?

Tags:

eclipse

I have a problem with one of my workspaces; if I start eclipse with all of the projects open, eclipse might take 20 minutes to even reach the point where it's even responsive, if not longer.

Is it possible to start eclipse in "safe mode", where none of the projects are open and plugins are disabled, so that I can get my workspace in order?

like image 676
vol Avatar asked Jan 18 '12 22:01

vol


People also ask

How do you close a workspace in Eclipse?

You can remove the workspace from the suggested workspaces by going into the General/Startup and Shutdown/Workspaces section of the preferences (via Preferences > General > Startup & Shudown > Workspaces > [Remove] ). Note that this does not remove the files itself.

How do I delete a closed project in Eclipse?

To delete a project, right-click on the project in the Package Explorer. Again, select “Delete” from the context menu. To delete your project select the option “Also delete contents under…” and select “Yes.”


Video Answer


1 Answers

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:

  1. Close Eclipse.

  2. 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).

  3. Start Eclipse.

  4. 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

like image 91
katsharp Avatar answered Sep 17 '22 00:09

katsharp