While working on a Flex project at work in the Eclipse / Flex Builder environment I had something interesting happen to me. I created a new folder (package structure) and series of new components and classes within this new package in our project. Well, I then began to work in some of the code specific to those new classes I made. I then needed to do a file search within my current project for a certain keyword. After I finished the search I went into the code and hit Control + Z the classic undo command. To my dismay all of my past work creating new folders and classes immediately just disappeared. I just said WTF! Umm has anyone seen the code I just made? It appears after looking into it that what happened was that I created my folders and classes within our Flex project, worked on code, searched and then after my search was over the focus of the eclipse editor was set to the Project Explorer and file system and since my last operation was the creation of the files, the undo command in context of the project pane undid all my code and folder additions. So I simply redid the operation and bam my newly created files appeared again just where I initially created them.
So all I have to say is this. Just be careful what pane has focus in Eclipse because it can undo things that you thought were in the text editor and actually it might be in the project pane or some other area you didn't intent to undo. This can possibly help prevent a freak out or having to redo some work that took you a while to make. What a pane (pain) in the arse!







0 comments:
Post a Comment