Eclipse includes a background parser called ‘Indexer’ which is used to assist the developer with various kind of information, for example jumping to a variable declaration or definition. Basically it is a parser running in the background collecting information about the sources and building up that ‘index’ data base.
In case of problems, I recommend rebuilding the index:
If this does not help, check the Indexer settings. I recommend unchecking ‘Allow heuristic resolution of includes’ especially for more complex projects:
Have a look to the ‘Paths and Symbols’ information: sometimes especially if a project has been copied or not properly configured it keeps orphaned entries which can be removed.
Finally a debug log of the indexer could be helpful. For this create a text file with following content (e.g. IndexerDebugOptions.txt):
org.eclipse.cdt.core/debug=true org.eclipse.cdt.core/debug/pdomtimings=true org.eclipse.cdt.core/debug/indexer=true org.eclipse.cdt.core/debug/parser=true org.eclipse.cdt.core/debug/deltaprocessor=true org.eclipse.cdt.core/debug/scanner=true org.eclipse.cdt.core/debug/model=true org.eclipse.cdt.core/debug/indexer/statistics=true org.eclipse.cdt.core/debug/indexer/activity=true org.eclipse.cdt.core/debug/indexer/problems=false
Then launch the Eclipse IDE from a console/command prompt with the -debug option pointing to that file (example for the NXP MCUXpresso IDE):
mcuxpressoide.exe -debug IndexerDebugOptions.txt
This produces a log to the console which can be helpful tracking down a problem:
Happy Indexing 🙂