1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-20 07:25:23 +02:00

[307825] - fixed to support linked resources

This commit is contained in:
Alena Laskavaia 2010-04-07 01:50:33 +00:00
parent aae25439d2
commit d89ad5f2d0

View file

@ -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);
}