Restore Deleted Files in Eclipse IDE

时光怂恿深爱的人放手 提交于 2019-12-02 17:58:17
Shreekant

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.
pushpendra yadav

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:

.

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.

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.

Go to Eclipse Menu Bar , and click Edit, and then click Undo Delete Resource. Each time you click "Undo Delete Resource" it brings back resources that have been deleted. I am not sure if you can recover deleted resources, if you try to recover after the machine has been restarted since you deleted your resource.

You don't wanna run into this several times, to be safe please always use version control like Git, SVN, Mercurial.

In case you are using VCS like SVN or GIT you can just recreate the file with same name and in the same location that's enough.

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