2.18. Restoring Deleted Resources

Problem

A needed file was deleted by mistake, and you want to restore it.

Solution

No problem. Restore the file using the container project’s Restore from Local History context menu item.

Discussion

To restore a deleted file, right-click the file’s project, and select Restore from Local History, opening the dialog shown in Figure 2-18. In the figure, a .class file that was deleted is restored.

Restoring a deleted file

Figure 2-18. Restoring a deleted file

Tip

Because the Java perspective’s Package Explorer doesn’t display all files, including .class files, you’ll need to switch to the Navigator view in the Java perspective or use the Resource perspective if you want to restore .class files.

Get Eclipse Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.