Every time an editable file is saved in the Workbench, the Workbench updates the local history of that file and logs the changes that have been made. The local history of a file can then be accessed and a previously saved copy of the file can be reverted to, as long as the desired state is recent enough in the save history.
Create a new file named sampleFile.txt.
In the editor for sampleFile.txt modify the resource by adding the line "change1" and saving the file.
From the resource's context menu in the Navigator view, select Replace With > Local History.
The Replace from Local History dialog opens and shows the previous local history of the file.
The left pane of the dialog contains the Workbench's copy
of the file. The figure above shows that 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 above) contains the
last saved copy of the file. This is the one with only two lines of text. The
final entry in the tree is the first copy of the file.
The bottom area of the dialog displays the differences between the Workbench file and the specific copy of the file selected in the local history.
Click Replace. This replaces the Workbench's copy of sampleFile.txt with the chosen local history item.
Observe that the sampleFile.txt editor now contains two lines.