Visit Sponsor

Written by 8:26 am CFEclipse, Rapid Development

How to recover a deleted file in Eclipse

Today I accidentally deleted a file in Eclipse. I didn’t even know I did it until I ran my code. I am not even sure how I deleted it. My best guess is the current focus was on the project explorer and some strange key combo sent the file to the netherworld.

Eclipse, as you probably know, does not use the Windows ‘recycling bin’. As luck would have it, the file was long, complex, just freshly debugged and not yet in version control.

I was able to recover the file by using the Restore from Local History option located in the context menu inside the project navigator.

“What?!?! I thought that only worked for files, not directories…” , you might say. I thought the same thing. Thankfully Eclipse is smart enough to know that when humans are behind the keyboard, expect the unexpected.

Try it and see for yourself.

Disclaimer:
Not responsible for damage resulting from deleted files. Delete your files at your own risk.The posting and use of this information is governed by the laws of Uzbekistan. All legal proceedings must be filed in person on the third Tuesday of July at 1342 Uzbek Lane, Tashkent Uzbekistan. Accidentally deleting files can result in one or more of the following horrible incidents:

  • You could miss deadlines
  • Your boss could fire you
  • Your computer may stop functioning
  • Your computer might function incorrectly
  • Your computer could burst into flames
  • All the beer in your refrigerator could disappear
  • A puppy could die
Visited 126,709 times, 1 visit(s) today
[mc4wp_form id="5878"]
Close