Eclipse indexing not working

前端 未结 13 2420
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-07 02:20

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

相关标签:
13条回答
  • 2021-02-07 02:59
    1. Right click on the project.
    2. Select New->Convert to a C++ Project. Select your configuration. And then Next
    3. Indexer will start indexing all the files.
    0 讨论(0)
  • 2021-02-07 02:59

    You can try rebuilding the index. Right-click on the project in Project View. Then Index -> Rebuild.

    0 讨论(0)
  • 2021-02-07 03:03

    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.

    0 讨论(0)
  • 2021-02-07 03:03

    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.

    0 讨论(0)
  • 2021-02-07 03:06

    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.

    0 讨论(0)
  • 2021-02-07 03:08

    For me this worked:

    • Right click and close the project
    • Open the project again
    • Right click and select Index->Rebuild

    I hope it helps anybody.

    0 讨论(0)
提交回复
热议问题