Today I was working on a Degrafa based skin. When I hit some unknown accidental key combination and discovered the file I was working on had been closed. This closure was followed by my problems window suddenly displaying about a dozen errors.
Moments later I discovered, why! The file, along with it’s two counterpart skins were “gone”, *poof*, DELETED, gone to the digital Gehenna. Needless to say, I was quite distraught. And while you might chime in with criticism on how I should have had copies of the file stored in an SVN or similar repository; let me add in my defense that this file was less than 10 minutes old.
But I had an idea…!!!!
I created a new copy of the file with the same filename. I then used Eclipse’s version compare tool to do a comparison of the current version against older versions. Thankfully, Eclipse retained this information. I was able to easily grab my old code and copy it to the new file instance
UPDATED: Dan Wilson chimed in that you can restore files from local history as well. (Found right below “Compare with”).
Thanks Dan!
– Jason The Saj
PS – If you are unfamiliar with Eclipse’s version compare tool. You need to familiarize yourself with it. You can find more info in my Flex Builder tips’n’tricks post here:
I don’t understand why you couldn’t have taken just one of those ten minutes to back up your file in SVN. 🙂
Seriously, this is an excellent tip; I would not have thought of fooling Eclipse that way. Thanks for posting it.
You can also right-click on the containing directory and restore the deleted file.
http://www.nodans.com/index.cfm/2008/1/18/How-to-recover-a-deleted-file-in-Eclipse
DW
Thanks Dan, totally missed that….even though it was so close by.
😉
IDIOT FLEX.
You might blame I’m new but it isn’t user’s friendly at all.
See, I create a new project on desktop, with a folder to store everything.
Then while deleting the folder and the content, everything in desktop gone. I can even recover it from recycle bin. Anyone work with dreamweaver before would know this certainly isn’t the way.
STUPID FLEX where it expect everyone is the master of flex.
I rather hope it’s a bug.
Searching through net, so many caught with the same problem.
Thanks a Million. I just recovered the file I deleted. You save my life.
Thanks again.
Big thanks. Saved me a lot of work.
THANK YOU THANK YOU THANK YOU THANK YOU THANK YOU
Thanks a lot. I spent one day to repair the file with some other recovering software. but none of the software recover or repairing it. You saved me from a lot of work, thanks again