mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 23:15:24 +02:00
[307825] - fixed to support linked resources
This commit is contained in:
parent
aae25439d2
commit
d89ad5f2d0
1 changed files with 2 additions and 3 deletions
|
@ -27,7 +27,6 @@ import org.eclipse.cdt.internal.core.resources.ResourceLookup;
|
|||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
@ -127,12 +126,12 @@ public abstract class AbstractIndexAstChecker extends AbstractChecker implements
|
|||
* org.eclipse.cdt.codan.core.model.IRunnableInEditorChecker#processModel
|
||||
* (java.lang.Object)
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public void processModel(Object model) {
|
||||
if (model instanceof IASTTranslationUnit) {
|
||||
IASTTranslationUnit ast = (IASTTranslationUnit) model;
|
||||
IPath location = new Path(ast.getFilePath());
|
||||
IFile astFile = ResourcesPlugin.getWorkspace().getRoot()
|
||||
.getFileForLocation(location);
|
||||
IFile astFile = ResourceLookup.selectFileForLocation(location, getProject());
|
||||
file = astFile;
|
||||
processAst(ast);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue