Restore Deleted Files in Eclipse IDE

前端 未结 8 519
独厮守ぢ
独厮守ぢ 2021-01-31 02:44

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

相关标签:
8条回答
  • 2021-01-31 03:03

    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.

    0 讨论(0)
  • 2021-01-31 03:05

    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

    0 讨论(0)
  • 2021-01-31 03:07

    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.

    0 讨论(0)
  • 2021-01-31 03:07

    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.

    0 讨论(0)
  • 2021-01-31 03:11

    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.

    0 讨论(0)
  • 2021-01-31 03:12

    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.

    0 讨论(0)
提交回复
热议问题