Open the CVS view and you should see a filter for local history. You should then be able to right-click on the correct version and Get Contents or do a manual compare and merge. I'm not sure what the eclipse defaults are for keeping local history but there is a decent chance you'll be able to get your stuff back if you act quickly.
You can use the link http://wiki.eclipse.org/FAQ_Where_is_the_workspace_local_history_stored%3F is very helpfull
VonC's answer has all the information you need for finding the location of your code backups. I would simply add that if you are on a Mac or Linux, you can do something like this:
$ cd [WORKSPACE]/.metadata/.plugins/org.eclipse.core.resources/.history/ $ grep -rl "class Foo" . | xargs ls -lt
This will find all the versions of a file that contains a particular string (ie. "class Foo"), and sort them by date/time to easily find the most recent version.
If you have lost a full package structure due to accidental deletion or svn/cvs override, select the project> right click> Restore from local history => select the files.
Try right-clicking on the file in eclipse, and choose Replace With->Local History.
If there's history available, it'll show up as a list of edit times.
But more importantly, as pointed out in other answers, be sure to put your files in version control! SVN is pretty easy to set up (you don't need a server; it can just use the file system); use it even if you aren't sharing with others.
A tip: whenever you hear yourself say "yes!", check in all of your code. 10 minutes later, you'll be saying "how did I mess that up?"
To complete CurtainDog's answer: from eclipse FAQ
Every time you modify a file in Eclipse, a copy of the old contents is kept in the local history. At any time, you can compare or replace a file with any older version from the history.
Although this is no replacement for a real code repository, it can help you out when you change or delete a file by accident.
Local history also has an advantage that it wasn’t really designed for: The history can also help you out when your workspace has a catastrophic problem or if you get disk errors that corrupt your workspace files.
As a last resort, you can manually browse the local history folder to find copies of the files you lost, which is a bit like using Google’s cache to browse Web pages that no longer exist.
Each file revision is stored in a separate file with a random file name inside the history folder. The path of the history folder inside your workspace is
You can use your operating system’s search tool to locate the files you are looking for.
Note, if your need to import your local history into a new workspace, you will need both:
to have a functional local history in that new workspace.
- Eclipse's local history...where are files saved?
- Where are hadoop jar files in hadoop 2?
- Where does Eclipse store information about which files are "Derived"?
- Where are the source files for forge?
- Where are the generated JSP class files located?
- Where are eclipse preference files stored during debug?
- Where are Eclipse key configurations saved on Mac OS X
- Where are all my files on eclipse? They were on the left side of the page?
- How to check whether all files inside a project are saved or not in Eclipse?
- How to handle Eclipse build path in a team, where local workspace paths are different?
- How to make replacements in Eclipse for multiple class files where number of lines are more than 25?
- How to run class files from jar file, where class files are in bin filder
- How to compile LESS into CSS when files are saved in Eclipse
- Parametrize location where eclipse settings are saved
- with eclipse 3.5.2 - android sdk - where are the log files from a crash
- Android - Where are custom APK files stored?
- Eclipse: where Eclipse installation files are located?
- Eclipse Neon 2, "No local history available for selected resource" for all files
- git pull and new java files are created in local directory, but not showing up in Eclipse
- Where in the eclipse project folder are files stored in External Storage?
- Which files are to be saved GitHub for an Android Project?
- Where can I view Tomcat log files in Eclipse?
- What are the gigantic *.CFS files all about in Eclipse workspace plugin folder?
- Java in Eclipse: Where do I put files on the filesystem that I want to load using getResource? (e.g. images for an ImageIcon)
- What are derived files in Eclipse?
- Where does Eclipse save the list of files to open on startup?
- Where to put static files for Spark Web Framework?
- Where are Run configurations stored?
- Git commit not possible. There are no staged files
- With maven - clean package, xml source files are not included in classpath
More Query from same tag
- Eclipse 2021-06 update: Cant find my workspace
- get project Linked resources path from eclipse-plugin run
- how to use jstl arraylist in jsp
- how to integrate play framework with scala IDE
- Eclipse "source not found" rt.jar
- Change Android Eclipse settings to ignore error
- Enable and disable all breakpoints in eclipse
- how can we install Java Api Help in Eclipse?
- Android studio from eclipse migration
- Eclipse find and replace
- Eclipse plugin: Add new menu into SVN > Team pop-up menu
- Using Selenium webdriver for Internet Explorer. Tests won't run
- Unabel to find @EnableAutoConfiguration or @SpringBootApplication in Spring boot (Eclipse)
- Eclipse Run As Groovy Script by Default
- Cannot run program "adb": error=2, No such file or directory while executing through eclipse
- Genymotion emulator does not start
- How to make a function wait for parse.com's saveInBackground result? (in android)
- How to get full path of the selected node in the package explorer from an Eclipse plugin?
- Convert from absolute path to IFile
- NoSuchMethodError: eclipse.core.runtime.ListenerList error in eclipse
- Tomcat is not starting sometimes in ubuntu14.04 through eclipse
- Generate java code in Eclipse?
- Eclipse not updating .class files
- Get contents from eclipse viewpart
- SQLGrammarException: Could not get list of suggested identity strategies from database (SQL-Server colllation Latin1_General_BIN)
- Android: Having trouble working with Camera source code
- EPartService findpart is null
- Eclipse Formatter: How to avoid indentation of method declaration after annotation?
- Eclipse plugin for LESS: How to hide errors of CSS frameworks?
- How to automatically expand empty packages in Eclipse with hierarchical presentation?