When Eclipse is starting to act weird or completely refuses to start, the .metadata probably got corrupted. Now what? You could delete the .metadata directory and waste a couple of hours to restore the IDE to a useful state.
Here are some tips to speed up the process a lot:
- If Eclipse still works, export your preferences.
- Install the Bulk Import plugin to save list of projects and their state.
- Instead of deleting .metadata/, rename it.
- Restore the folder “.metadata/.plugins/org.eclipse.core.runtime/.settings” from the backup. This is basically the same as the preferences. Kudos to Tomas Kramar for figuring that one out.
- Restart Eclipse. You should get an empty workspace but all your preferences should be there.
- Use the buttons in the toolbar to restore all your projects.
With a way to preserve your preferences, saving the project state the workspace layout, you should be able to quickly restore the IDE.
- Eclipse Dance Steps – “Sometime Eclipse fails to work as expected. The following ‘dances’, in increasing order of desperation, may help. Remember to maintain a fixed grin throughout and try not to tread on your own toes.”