Local history

Every time you save an editable file in the Workbench, the Workbench updates the local history of that file and logs the changes that you have made to it. You can then access the local history of a file and revert to a previously saved copy of the file, as long as the desired state is recent enough in the save history.

  1. Create a new file named sampleFile.txt.

  2. In the editor for sampleFile.txt modify the resource by adding the line "change1" and saving the file.

  3. Repeat this by entering a new line "change2" and saving it again.
  4. Add a third line "change3" and save it again.
  5. From the resource's context menu in the Navigator view, select Replace With > Local History.

  6. The Replace from Local History dialog opens and shows the previous local history  of the file.

     Local history

    The left pane of the dialog contains the Workbench's copy of the file. In the figure below we can see the Workbench contains the copy with all 3 lines - the same copy that is currently shown in the editor area of the Workbench. 
     

    The first item in the local history (see below) contains the last saved copy of the file. This is the one with only two lines of text. The bottommost entry in the tree is the first copy of the file.
     

    The bottom area of the dialog allows us to see the differences between the Workbench file and the specific copy of the file selected in the local history.  

  7. Select the first item (shown above) in the local history. The right pane should show one line of text. 
  8. Click Replace. This replaces the Workbench's copy of sampleFile.txt with the chosen local history item.

  9. Observe that the sampleFile.txt editor now contains two lines. 

Next topic Exiting the Workbench 

Back to previous topic Working with the comparison

Copyright IBM Corporation 2000, 2002. All Rights Reserved.