1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

- more precise positioning for ast nodes in editor

This commit is contained in:
Alena Laskavaia 2009-11-21 02:23:25 +00:00
parent e5c11f21e8
commit 0e300b754c

View file

@ -85,12 +85,18 @@ public abstract class AbstractIndexAstChecker extends AbstractChecker implements
if (astFile == null) {
astFile = file;
}
getProblemReporter().reportProblem(
id,
new ProblemLocation(astFile, astLocation
.getStartingLineNumber()), message);
ProblemLocation loc;
if (astLocation.getStartingLineNumber() == astLocation
.getEndingLineNumber())
loc = new ProblemLocation(astFile, astLocation.getNodeOffset(),
astLocation.getNodeOffset() + astLocation.getNodeLength());
else
loc = new ProblemLocation(astFile, astLocation
.getStartingLineNumber());
getProblemReporter().reportProblem(id, loc, message);
}
@Override
public boolean runInEditor() {
return true;
}