I am using CDT in Eclipse 3.5.2 Galileo in Ubuntu.
My eclipse\'s indexer doesn\'t work at times. By that I mean when I ctrl
click a function it says
New->Convert
to a C++
Project.
Select your configuration. And then NextYou can try rebuilding the index.
Right-click on the project in Project View. Then Index -> Rebuild
.
Here is the solution I used after Project->C++ Index->Rebuild
failed. This trick avoid deleting your current project :
1) Copy the current project (Right click->Copy from Project Explorer)
2) Paste it (Right click->Paste from Project Explorer) and give the copy another name
3) The indexer should now start and index both projects
4) When indexation is complete, you can delete the copy
PS: Make sure your original project is an actual C++ Project or this will obviously not work.
I was having the same problem and it turns out that the index folder was owned by root (I must have run Eclipse as a root once for some reason) I reclaimed the project folder using sudo chown -R username projectfolderpath
and problem solved.
If your indexer is stuck and it hangs for infinite time, you can delete the indexer related files of your project from .metadata
. Make sure eclipse is not running in the meanwhile.
The .metadata
directory is located as a hidden folder in the path of your workspace.
There you can navigate to:
<workspace_path>/.metadata/.plugins/org.eclipse.core.runtime/.settings/
Inside the .settings/
directory there are .prefs
files which store the preferences of each project individually.
For example: org.eclipse.cdt.core.prj-test-project.prefs
stores the preferences of the project test-project
Open this file with the text editor and remove all the lines starting with indexer
. This will reset the indexer settings for this specific project to the default.
Alternatively, you can remove all the lines starting with indexer
from org.eclipse.cdt.core.prefs
; doing this will reset the indexer settings for the whole workspace.
For me this worked:
I hope it helps anybody.