mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-21 07:55: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.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.Path;
|
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
|
* org.eclipse.cdt.codan.core.model.IRunnableInEditorChecker#processModel
|
||||||
* (java.lang.Object)
|
* (java.lang.Object)
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("restriction")
|
||||||
public void processModel(Object model) {
|
public void processModel(Object model) {
|
||||||
if (model instanceof IASTTranslationUnit) {
|
if (model instanceof IASTTranslationUnit) {
|
||||||
IASTTranslationUnit ast = (IASTTranslationUnit) model;
|
IASTTranslationUnit ast = (IASTTranslationUnit) model;
|
||||||
IPath location = new Path(ast.getFilePath());
|
IPath location = new Path(ast.getFilePath());
|
||||||
IFile astFile = ResourcesPlugin.getWorkspace().getRoot()
|
IFile astFile = ResourceLookup.selectFileForLocation(location, getProject());
|
||||||
.getFileForLocation(location);
|
|
||||||
file = astFile;
|
file = astFile;
|
||||||
processAst(ast);
|
processAst(ast);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue