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.
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. 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.
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.