How do I make eclipse rebuild the database of classes contained within a project or workspace? This is what it uses to make the "References" menu action work, what it uses for the "Add import" dialog, etc. Basically, it's part of the core usefulness of Eclipse. And now, it's only working for maybe 5% of my project.
I've run into this problem multiple times: something happens with eclipse, either through an OutOfMemoryError because I opened some huge file, or because a workspace just has months of hard usage.
Right now, I'm using Eclipse Galileo on Win32. However, I've had this problem on MacOS as well as with Europa and Ganymede.
In the past, I've trashed my workspace and started again, but today this is not an option. My last workspace backup is from last Friday, but that still means hours of work in restoration. Surely there must be another option?
EDIT: I've used eclipse -clean as well as rebuilt my project. This is a corruption problem somewhere in eclipse, not in my project.
From eclipse.org, select Projects > Eclipse Project > Platform > Core, and then look for the workspace restorer plug-in on the development resources page. Be sure to also enter a bug report in the Eclipse Bugzilla with any available log information to help prevent such disasters from happening to others!
For Eclipse you can find the rebuild option under Project > Clean and then select the project you want to clean up... that's all. This will build your project and create a new bin folder. Save this answer.
The Quick Fix dialog can also be displayed by right clicking on the error item in the Problems view and selecting the Quick Fix menu item.
First exit Eclipse. Next in your workspace directory, delete the .metadata/.plugins/org.eclipse.jdt.core/
directory. Next time you launch Eclipse, it will rebuild all of its internal indexes. Often cleaning of projects doesn't force all of that metadata to be rebuilt.
If it's just on a project level, I recall that you can simply close the project (i.e. Project -> Close project), then re-open it (Project -> Open project). You shouldn't even need to restart eclipse.
This worked:
That works for getting the references DB fixed. To get SVN (and presumably CVS) to work again:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With