Eclipse automatically keeps track of the changes. Changes made few days ago... a few minutes ago. This is stored in a Local History. The changes are stored automatically.
You can control how long you want to keep the changes. And how many changes you want Eclipse to remember. The default preferences for this can be set from
. These are the preferences that can be modified:How to use the local history? You can either compare your source file with local history, or replace it altogether.
on the source file to access the context sensitive menu:Let’s change example.c
to see this in action. on example.c
. Select
You will get Local History View. You can see the original file
by double clicking on the file. To see the difference against current file,
enable compare mode. You can also
group revisions by date. Once compare mode is enabled, double click on an
entry in Local History View. A sample diff is shown. (See that Eclipse diff is intelligent to
find that all changes are only to comparessBound
function.
Local History View
Enable Compare mode in local history
Sample Diff