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
I would suggest running Project > Clean... on the project. This should cause a compete recompile of the project.
You can begin by trying to delete your project (without deleting the sources of course, only the metadata associated with it).
Then you re-import your project into your workspace (since the .classpath and .project are still on your hard-drive)
That way, the all workspace is not affected, only the part concerning the current project.
For me it was a filter... Pressing CTRL + G on Windows Eclipse Luna having 'Potential Matches' actually CHECKED made the problem go away.
As searching for a clear() method would return all sorts of different results.
a) quit Eclipse
b) remove all your project bin / target folders (e.g. with commandline)
#starting from current folder (".") search for folders
# ("-type d") with name (-iname ) "target" or "bin"
# feed this to xargs which calls
# rm -rf (remove recursive "-r" and force "-f")
# with the results from find
find . -iname "target" -type d | xargs rm -rf
or
find . -iname "bin" -type d | xargs rm -rf
c) restart eclipse
Normally is NOT nessary to you remove any project from workspace or to remove .classpath or .setting !
d) clean all projects
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.
When this happens I usually have to delete the projects from the workspace, go to command line and rm -rf .settings .profile .classpath and then reimport the projects back in. Sometimes I have to delete the metadata directory (which means I have to reinstall some of my plugins). I have yet to find an actual fix for this. Cleaning the project does nothing to help.
You shouldn't have "hours of restoration" work to do if you just delete the .settings .profile and .classpath. You just need to reimport the projects back in after removing them from the workspace. While an annoyance, it shouldn't take more than 5 - 10 minutes.