I just managed to corrupt contents of my Eclipse .metadata directory. Starting up with eclipse -clean did not work out. Deleting .metadata and then importing all projects, plugins and setting does not sound too interesting. I ended up moving .metadata/.plugins/org.eclipse.core.resources/ elsewhere and reimporting my projects only.
Are there any tools or best practices to recover workspace?
I haven't been able to avoid rebuilding workspace occasionally (one or twice over several years of using eclipse). Delete the .metedata and rebuild.
In my case only removing
org.eclipse.e4.workbench
directory (under.metadata/.plugins
) and restarting Eclipse solved the problem.None of the above worked for me. But what actually worked was deleting all *.snap files from my workspace. This also preserves almost all settings including imported projects. Make sure to back up the workspace before trying it though!!!