Bug 172866 - [Scanner Discovery] [Indexer] Nothing is parsed with disabled automatic discovery and per file profile selected
Summary: [Scanner Discovery] [Indexer] Nothing is parsed with disabled automatic disco...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-05 10:54 EST by Gerhard Schaber CLA
Modified: 2020-09-04 15:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Schaber CLA 2007-02-05 10:54:45 EST
Build ID: I20061214-1445

Steps To Reproduce:
1. Open the project properties of a standard make project
2. Switch to the Discovery options page
3. Enable Automate discovery of paths and symbols
4. Select GCC per file scanner info profile
5. Disable Automate discovery of paths and symbols
6. Right-click the project and select Rebuild Index (in the C/C++ perspective)

None of the files in the project will be parsed.


More information:
The reason is that org.eclipse.cdt.core.model.CoreModel.isScannerInformationEmpty(IResource) returns false for each resource. The method is called from org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask.TranslationUnitCollector.visit(ICElement) and org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask.processDelta(ICElementDelta, Collection, Collection, Collection) in order to check if a resource should be parsed or not, but with the per file scanner info profile isScannerInformationEmpty always returns false, even if the scanner discovery if completely turned off.
One way to fix this could be to call PDOMManager.setIndexAllFiles if scanner discovery is turned off. In this case all files would be parsed.