I've just did a hard reset on wrong project. What saved my life was Eclipse's local history. IntelliJ Idea is said to have one, too, and so may your editor, it's worth checking:
- Eclipse help topic on Local History
- http://wiki.eclipse.org/FAQ_Where_is_the_workspace_local_history_stored%3F