Hi Nathan, Marc-Andre,all,
Thanks a lot for your suggestions,
I am using CDT 9.2.1.
I have a custom wizard for project creation and using some api to create CDT properties for the project.
When project is created I have selected "use active build configuration" in cdt properties and indexer seems to get 0 results, indeed.
When I reimport the project, it changes into "Use a fixed build configuration", and indexer is better.
How to set from the beginning"
Use a fixed build configuration " ?
How to programmatically select "Store settings with project?"
I found to use
IndexerPreferences.setScope(project, IndexerPreferences.SCOPE_PROJECT_SHARED);
but it is API restricted, it make possible to check the option, but the file org.eclipse.cdt.core.prefs is not created.
Some samples of logs from cdt + my logs, I will try to provide more concrete details later:
I restarted eclipse, indexer kicked off for existing project with some good results. Then I think I changed nothing in CDT properties, just press ok, and indexer restarted and provided zero results immediately:
Usually I can reproduce it if I change anything from cdt indexer properties.
Indexer: Imported shared index for
project MyProject
INDEXER START
>>> AbstractIndexerTask.indexFilesToRemove.size() 33
>>>
filesForLinkage 1746
>>>
filesForLinkage 630
>>> fTaskCompleted
fUrgentTasks.isEmpty()
PDOMIndexerTask fWriteInfoToLog=
false
PDOMIndexerTask index=
org.eclipse.cdt.internal.core.index.WritableCIndex@725e6aee
C/C++ Indexer: Project 'MyProject' (1995 sources, 4662
headers)
Options:
indexer='PDOMFastIndexer', parseAllFiles=false, unusedHeaders=skip,
skipReferences=false, skipImplicitReferences=true, skipTypeReferences=false,
skipMacroReferences=false.
Database: 298389504
bytes
Timings: 267909 total,
139177 parser, 60847 resolution, 53262 index update.
Errors: 0 internal, 9608
include, 3 scanner, 3167 syntax errors.
Names: 498168
declarations, 4447382 references, 543736(9.91%) unresolved.
Cache[128MB]: 928305724
hits, 71160(0.01%) misses.
INDEXER END => Seconds 268.0
INDEXER START
>>>
indexFilesToRemove.size() 0
>>> fTaskCompleted
fUrgentTasks.isEmpty()
PDOMIndexerTask fWriteInfoToLog=
false
PDOMIndexerTask index=
org.eclipse.cdt.internal.core.index.WritableCIndex@4cc132cb
C/C++ Indexer: Project 'MyProject' (0 sources, 0 headers)
Options:
indexer='PDOMFastIndexer', parseAllFiles=false, unusedHeaders=skip,
skipReferences=false, skipImplicitReferences=true, skipTypeReferences=false,
skipMacroReferences=false.
Database: 298389504
bytes
Timings: 36 total, 0
parser, 0 resolution, 0 index update.
Errors: 0 internal, 0
include, 0 scanner, 0 syntax errors.
Names: 0 declarations, 0
references, 0(0.00%) unresolved.
Cache[128MB]: 204 hits,
0(0.00%) misses.
INDEXER END => Milliseconds 37;
Seconds 0.0
Thank you
Kind Regards
Lidia