Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse reverts all changes to file on key press, undo not possible?

Somehow I just pressed some key or key combination in eclipse (android development) and eclipse suddenly restored the previous version of the file I was working on. CTRL Z/Y does not help. Do I have to do all my changes to the file again!??

And WHAT could I have just done? I don't want that to happen anymore. How could I possible continue working with eclipse knowing this could happen again sometime.

Thanks,

like image 715
cdbeelala89 Avatar asked Jun 07 '13 21:06

cdbeelala89


People also ask

How do I undo changes in Eclipse?

To perform the reverting action click on the 'Team>Revert...' menu item of the resource pop-up menu 'Revert...' menu item of the 'SVN main menu group'. The dialog allows the user to choose which resources changes to revert and provides a probability to remove unversioned resources.

How do I restore a previous version of an eclipse file?

You also can revert an entire file to its previous version by right-clicking it in a view such as the Package Explorer and selecting one of the following menu items: Replace With→ Previous from Local History. Replaces the file with the previous version in local history. Replace With→ Local History.


1 Answers

I think I had the same problem and figured it out after a few minutes.

Eclipse keeps a local version history and it is somehow possible with a wrong click or the wrong key-press to revert back to a previous version I am not sure what caused it.

To fix it right-click on the file name and then go down to "Replace With"->"Previous from Local History" you should now be able to find the correct version and get back your lost work.

like image 172
Doug A Avatar answered Sep 27 '22 22:09

Doug A