Narges Sadri
Narges Sadri

Reputation: 553

Restore Deleted Files in Eclipse IDE

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?

Upvotes: 51

Views: 112624

Answers (9)

ddavison
ddavison

Reputation: 29032

Answer: You can't.. sorry :\

If restoring from local history does not work, then you are likely out of luck i'm afraid.

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.

Upvotes: 3

Shreekant
Shreekant

Reputation: 1761

You can use the information in this Java Tips page (archived)

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.

Upvotes: 176

dlekhak
dlekhak

Reputation: 1

When you see the "No additional members found in local history" message while trying to retrieve the files after right-clicking a parent folder or package, try right-clicking the next immediate parent folder or package in the project (or the project itself as mentioned above). When I right-clicked the next immediate parent folder; I was able to restore deleted files in a similar situation.

Upvotes: 0

sho fm
sho fm

Reputation: 11

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

Upvotes: -1

itssaifurrehman
itssaifurrehman

Reputation: 41

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.

Upvotes: 0

pushpendra yadav
pushpendra yadav

Reputation: 939

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.

Upvotes: 25

Fidelis Chimombe
Fidelis Chimombe

Reputation: 31

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.

Upvotes: 3

S_intg
S_intg

Reputation: 332

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.

Upvotes: 0

Mordechai
Mordechai

Reputation: 16234

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.

Upvotes: 4

Related Questions