| Summary: | CodanCReconciler does not find resources consistenly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Alex Ruiz <alruiz> | ||||
| Component: | cdt-codan | Assignee: | Sergey Prigogin <eclipse.sprigogin> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Elena Laskavaia <elaskavaia.cdt> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | alruiz, cdtdoug, eclipse.sprigogin, jamesblackburn+eclipse | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Alex Ruiz
Created attachment 189970 [details]
Proposed patch
Patch with the proposed solution.
> String filePath = ast.getFilePath();
> URI uri = new File(filePath).toURI();
> IFile[] resources = ResourceLookup.findFilesForLocationURI(uri);
That still looks weird. How does this cope with non-file URI paths? Does this stuff support generic EFS resources at all?
Probably Alena is the best to answer this question :) AFAIK, codan only works with files (at least that is the default behavior in IChecker#enabledInContext(IResource) (In reply to comment #2) > > String filePath = ast.getFilePath(); > > URI uri = new File(filePath).toURI(); > > IFile[] resources = ResourceLookup.findFilesForLocationURI(uri); > > That still looks weird. How does this cope with non-file URI paths? Does this > stuff support generic EFS resources at all? Fixed in HEAD > 20110325. *** cdt cvs genie on behalf of sprigogin *** Bug 338349. Added IASTTranslationUnit.getOriginatingTranslationUnit method. [*] ASTTranslationUnit.java 1.19 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTTranslationUnit.java?root=Tools_Project&r1=1.18&r2=1.19 [*] IASTTranslationUnit.java 1.61 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTTranslationUnit.java?root=Tools_Project&r1=1.60&r2=1.61 [*] TranslationUnit.java 1.117 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java?root=Tools_Project&r1=1.116&r2=1.117 [*] CodanCReconciler.java 1.5 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanCReconciler.java?root=Tools_Project&r1=1.4&r2=1.5 |