Mar
23

One of my developers came to me this morning and exclaimed: "Aaron, I hate Eclipse and I hate this project!" I was stunned by the blasphemous language and knew I needed to get more information in order to fully understand the situation. While making great progress on an important piece of code Eclipse completely crashed and he lost all his work. Restarting Eclipse brought his Workbench back but the template he was working on did not include his latest saves. He decided to take a break from the project and work on other tasks

As I explained to him, Eclipse has a built-in history manager that keeps track of all your saves. You determine how long to keep files on your system, the number of saves to track, and the maximum allowable file size for each individual history item. With these settings in place, retrieving previously saved versions of files is simply a matter of right-clicking the file, and selecting Compare With > Local History or Replace With > Local History. Regardless which you choose, Eclipse displays a list of each saved instance of the file including the date and time. You can select any version you want and compare that version to the current version on disk. If you choose Replace With - Local History, you can replace the current version with any previous version from the local history. The Local History is no replacement for source control management, but it's definitely useful in certain situations.

Now, relax, grab a coffee, and get back to work!

Aaron West's Gravatar
About this post:

This entry was posted by Aaron West on March 23, 2007 at 9:40 PM. It was filed in the following categories: ColdFusion, Eclipse. It has been viewed 35870 times and has 10 comments.

10 Responses to Do You Know About Eclipse's Local History?

  1. This has saved my butt a few times!!!

  2. Another nifty feature is the 'Restore from local history'. This comes in handy if you accidentally delete one or more files from a directory. You simply right-click on a directory and choose 'Restore from local history...'.

    I have found this to be more valuable than restoring a file from local history.

  3. Saved my butt a few times just in the past couple of weeks. Great feature.

  4. Ryan Rampersad's Gravatar Ryan Rampersad

    I'd like to use this feature but I can't seem to find it. I'm using Eclipse IDE for Java Developers - Build id: 20090619-0625 and I thought that may be why I can't find those settings, even with the little search box.

  5. For example, right-click on a file and select "Compare with" - "Local history"

  6. Thanks! I was trying to find where to change the settings here and you gave an awesome screenshot.

  7. Saad's Gravatar Saad

    Dude! this was a life saver!! thanks! :D

  8. scott's Gravatar scott

    saved mein arsch

  9. Shachi's Gravatar Shachi

    Helped me!! ThankYou :)

  10. Darshan L's Gravatar Darshan L

    I have heard about this feature a lot. But i am not able to make use of this-
    My "History" will also be empty.
    What would be the problem here?
    I have tried quite a lot to figure out the issue but haven't been successful.

Leave a Reply

Leave this field empty

If you subscribe, any new posts to this thread will be sent to your email address.

RSS