Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329323

Summary: Parser(and the indexing also) is workspace-dependent
Product: [Tools] CDT Reporter: ben (Istvan Benedek) <istvan>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
Status: ASSIGNED --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: cdtdoug, yevshif
Version: 8.0   
Target Milestone: ---   
Hardware: All   
OS: other   
Whiteboard:

Description ben (Istvan Benedek) CLA 2010-11-03 04:35:23 EDT
Build Identifier: I20101028-1441

Reason: all IncludeFileContentProvider implementations have workspace dependency.

There is no workspace-independent instance for include-file reading: the getSavedFilesProvider() method provides a class (SavedFilesProvider), that handles both.
It checks the Workspace first and use external files afterwards.
Even if such mixed include-processing is required (system headers?), a workspace-free (only external) implementation should also be present (for standalone parsing).
I suggest a new IncludeFileContentProvider.getExternFilesProvider() method with a proper implementation.

Please drop me a notice if i should you provide a patch for this:
 the splitting of the mentioned SavedFilesProvider is pretty straight forward; the resulting extern-reader can be even used as base for it.

Reproducible: Always

Steps to Reproduce:
check the SavedFilesProvider.getContentForInclusion() for dependencies.
Comment 1 Markus Schorn CLA 2010-11-04 06:19:01 EDT
(In reply to comment #0)
> ...
> I suggest a new IncludeFileContentProvider.getExternFilesProvider() method 
> with a proper implementation.
> Please drop me a notice if i should you provide a patch for this:
>  the splitting of the mentioned SavedFilesProvider is pretty straight forward;
> the resulting extern-reader can be even used as base for it.
A patch would be nice, I don't see the need for basing SavedFilesProvider on the new FileContentProvider.