Eclipse 项目被删除了怎么撤消呢?或恢复它
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7736733/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse project was deleted how to undo it? or recover it
提问by user990967
I have to recover a deleted Eclipse blackberry project.
我必须恢复已删除的 Eclipse 黑莓项目。
回答by Stephen C
If you deleted the project with "delete from disk" checked then Eclipse will have deleted the project files. You might get lucky ...
如果您在选中“从磁盘删除”的情况下删除了项目,那么 Eclipse 将删除项目文件。你可能会走运...
- 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 allof your files back. (See other Answers.)
- 使用版本控制,并确保定期检入代码。
- 选择一个 VCS,它允许您拍摄“目前不工作”代码的快照。
- 定期文件系统备份是一个好主意,包括保存版本控制存储库的磁盘的文件系统备份。(理想情况下,备份媒体应保存在另一栋建筑物中。发生火灾。)
- 不能依赖磁盘恢复软件来恢复所有文件。(请参阅其他答案。)
And, most importantly:
而且,最重要的是:
- Be careful when you delete stuff. Think before you click.
- 删除内容时要小心。点击之前请深思。
回答by Mani
I tried Ctrl+Zto get back the delete project (provide, not closed the eclipse after deleting the project, did not check the 'delete from disk' option).
我尝试Ctrl+Z取回删除项目(提供,删除项目后未关闭eclipse,未选中“从磁盘删除”选项)。
回答by рüффп
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.
如果您在没有通过 windows 或 linux "Bin" 的情况下意外删除了文件系统上的文件夹/文件,那么您只有一种没有保证的解决方案:恢复软件。
One example is: http://www.piriform.com/recuva
一个例子是: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.
这是没有保证的,因为如果您不在硬盘上写入另一个文件,它会更好地工作。如果您等待的时间越来越长,恢复文件的可能性将趋于零。当您删除文件时,它不会被物理删除,而是硬盘上标记为“可用”的扇区可用于新文件。这就是为什么这些恢复软件不能保证恢复一切。
回答by Eric Lange
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!
惊慌失措后,我在这里查看并看到了上面斯蒂芬的回答,然后更加惊慌失措。但是,恢复工具来救援!在我的 Mac 上,EaseUS Mac Undelete是免费的,它运行起来非常棒。我能够搜索所有 .java 文件,重新克隆存储库,然后复制更改的文件。我失去了一个小时的工作,可能还有一年的时间,但我找回了代码!
Update: I was able to recover someof it. Not all. But some is better than none.
更新:我能够恢复其中的一些。不是全部。但有总比没有好。
回答by alexey
Not sure about OS you have, but the first idea to find deleted files is to check Recycle or Trash.
不确定您拥有的操作系统,但找到已删除文件的第一个想法是检查回收站或垃圾箱。