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”).
– 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: