Restore Deleted Files in Eclipse IDE

2020-05-14 14:33发布

Two days ago, I deleted five Java files in Eclipse IDE and now I need them. I tried to restore them from the local history. I restored only two of them. When I right click on the other files and then click restore from local history, I get the error message No additional members found in local history. How can I restore those three files?

8条回答
兄弟一词,经得起流年.
2楼-- · 2020-05-14 15:02

You can use the information in this Java Tips page.

I deleted my src folder, and used the following steps to get it back:

  1. Select Project
  2. Right Click
  3. Select Restore from local history in the context menu
  4. Select your files,
  5. Click OK.
查看更多
爱情/是我丢掉的垃圾
3楼-- · 2020-05-14 15:02

Answer: You can't.. sorry :\

If restoring from local history does not work, then you are out of luck i'm afraid.. the point of deleting files, is to DELETE them.. not ever needing them back.

my suggestion is be more careful when deleting and use a Source Control Management software like SVN or Git, so you can version your files to prevent things like this from happening again.

查看更多
等我变得足够好
4楼-- · 2020-05-14 15:05

It is very simple. You can use these steps:

  1. Right click on the project of which you want to recover.

  2. Select restore from local history.

  3. Select the file/files to recover plus version too.

查看更多
不美不萌又怎样
5楼-- · 2020-05-14 15:08

Steps to recover the deleted files:

  1. Go to the project.
  2. Right click on the project.
  3. Select restore from local history.
  4. Select the file/files to recover.

Please see the attached image:

how to recover deleted file in eclipse.

查看更多
Explosion°爆炸
6楼-- · 2020-05-14 15:08

You can use the information in this Java Tips page.

I deleted my src folder, and used the following steps to get it back:

--> Select Project

--> Right Click

--> Select Restore from local history in the context menu

--> Select your files,

--> Click OK.

--> Then go to your git and do "git checkout filename"

--> This should fully restore the file and its content

I hope this helps

查看更多
仙女界的扛把子
7楼-- · 2020-05-14 15:09

If you still have the binary form (.class), that is you only deleted the source code, then you can decompile then back to source.

Search on Google for some decompilers, for example Cavaj.

查看更多
登录 后发表回答