Eclipse project was deleted how to undo it? or recover it [closed]

半腔热情 提交于 2020-01-09 19:28:36

问题


I have to recover a deleted Eclipse blackberry project.


回答1:


If you deleted the project with "delete from disk" checked then Eclipse will have deleted the project files. You might get lucky ...

  • Check your file system backups. If the backups are recent, the missing files may be there.
  • If you are using a version control repository, check to see if you can recover from the most recent commit.
  • If you have a (platform specific) deleted file recovery tool you may be able to recover some of the deleted files that way.

If you didn't check "delete from disk", you should be able to recover by re-importing the project using "Import > General > Existing Project into Workspace". (Use Browse to select the directory containing project and it should show up in the Projects: list.)


To anyone who finds themselves in this unfortunate situation, the lessons are:

  • Use version control, and make sure that you check in your code regularly.
  • Choose a VCS that allows you to take snapshots of "not working at the moment" code.
  • Regular file system backups are a good idea, including file system backups of the disc holding your version control repository. (Ideally the backup media should be kept in another building. Fires happen.)
  • Disk recovery software can't be relied on to get all of your files back. (See other Answers.)

And, most importantly:

  • Be careful when you delete stuff. Think before you click.



回答2:


I tried Ctrl+Z to get back the delete project (provide, not closed the eclipse after deleting the project, did not check the 'delete from disk' option).




回答3:


If you delete accidently folder/files on the file system without passing through the windows or linux "Bin" you have only one solution which is whithout guarantee: recovery software.

One example is: http://www.piriform.com/recuva

The are whithout guarantee because it works better if you do not write another file on your harddisk. After if you wait more and more, the probability to recover the file tends to zero. when you delete a file it is not physically deleted but the sectors on the harddisk marked as "available" for new file. That is why these recover software cannot guarantee to recover everything.




回答4:


I just ran into this and nearly barfed. I had not done a check-in in two days because I was in the middle of a major refactoring. I was trying to create a project to sit in the same directory tree as two others but did something wrong. So I thought I was just deleting the newly created project. Well, it apparently assumed the project WAS the entire directory tree for both original projects and blew them all away.

After panicking, I checked here and saw Stephen's answer above and then panicked some more. But, recovery tools to the rescue! On my mac, EaseUS Mac Undelete, which is free, worked like a charm. I was able to search for all .java files, re-clone the repository and then copy in the changed files. I lost an hour of work, and probably a year off my life, but I got the code back!

Update: I was able to recover some of it. Not all. But some is better than none.




回答5:


Not sure about OS you have, but the first idea to find deleted files is to check Recycle or Trash.



来源:https://stackoverflow.com/questions/7736733/eclipse-project-was-deleted-how-to-undo-it-or-recover-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!