Eclipse code reverts to historical version

Source: Internet
Author: User

Eclipse each time an editable file is saved in the Workbench, the Workbench updates the local history file and logs changes. The local history of the file can be accessed and the previously saved copy file can be restored as long as the required state is recent in the Save history. Let me show you how to do local code recovery. When we use eclipse to encode, we may have done something wrong to cause the code to be lost. So it's important to restore the code to a historical point of time that we coded.

1. Create a new file named SampleFile.txt.


2. Change the sampleFile.txt in the editor. Add a line "Change1" to save the file.


3. Continue to change this file, add a new line "Change2" and save it again.


4. Add a new line "Change3" and save it again.


5. Right-click on the File navigation bar page (e.g. Project Explorer) and select Team > Show Local history.


6. History view opens and displays the history file.


7. The entries in the front view represent the current contents of the file. Next represents the previous content and so on. Right-click on the previous entry and select Compare with local open compare editor to display the diff file between the current work station and the specific copy file selected in the local history.


8. Right-click the previous entry again and select content. A copy of the workbench that replaces Samplefile. TXT and select Local history projects.


9. Then observe the SampleFile.txt file, which contains the 2 rows you want.

Eclipse code reverts to historical version

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.