Eclipse: All the projects disappeared from Project Explorer

eclipse

It seems like all my projects (except one) disappeared from the view Project Explorer.

I'm using Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911

Note: all the projects are present on the file system.

How to bring them back? Any ideas?

Best Answer

This happened to me. I'm still not sure how, but the reason was that my workspace meta data had become corrupted, probably due to Eclipse being improperly shutdown. The solution, as explained here, is to:

Note, steps 2 & 3 are optional if Eclipse isn't crashing, but just not showing any projects.

  1. Close Eclipse.
  2. cd /home/user/workspace/.metadata/.plugins
  3. mv org.eclipse.core.resources org.eclipse.core.resources_bak
  4. Start Eclipse
  5. Do File->Import
  6. General->Existing Projects into Workspace
  7. Click the "Select root directory" field and browse to each subfolder in your workspace folder, and import.

For me, this was very tedious, since I had several dozen projects in my workspace, but it's the only solution I found short of restoring my entire workspace from a backup.

Edit: This answer is now quite old, and better solutions may now exist. Although I haven't had need to try it, I recommend attempting @antonagestam's solution first, as others have suggested it may be faster and more effective.

Edit: Since it's fairly simple, I'd recommend trying antonagestam's solution first. However, this problem recently re-occurred for me, and that solution did not work in my case. But neither did it interfere with this solution.