Cronologia locale

Ogni volta che viene salvato un file modificabile nel workbench, quest'ultimo aggiorna la cronologia locale di tale file e registra le modifiche apportate. Successivamente è possibile accedere alla cronologia locale del file e ritornare a una copia del file precedentemente salvata, procedendo all'indietro nelle varie fasi della cronologia.

  1. Create a new file named sampleFile.txt.
  2. In the editor for sampleFile.txt modify the file by adding the line "change1" and saving the file.
  3. Ripetere la stessa operazione inserendo una nuova riga "change2" e salvando di nuovo.
  4. Aggiungere una terza riga, "change3" e salvare il file.
  5. Right-click the file in a navigation view (e.g. the Resource Navigator) and select Team > Show Local History.

    Note: Repository tooling may override the Team > Show Local History operation to provide a unified history for a file. The Eclipse CVS client does override this action. To get the history for a file in a project that is shared with CVS, you will need to right-click the file and select Team > Show History. See Working with CVS History for more details about the CVS history of a file.

  6. The History view opens and shows the history for the file. Local History view
  7. The top entry in the view represents the current contents of the file. The next represents the previous contents and so on. Right-click on the previous entry and select Compare Current with Local to open a Compare editor that displays the differences between the Workbench file and the specific copy of the file selected in the local history. Local History Compare Editor
  8. Right-click on the previous entry again and select Get Contents. 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.