1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +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) { if (astFile == null) {
astFile = file; astFile = file;
} }
getProblemReporter().reportProblem( ProblemLocation loc;
id, if (astLocation.getStartingLineNumber() == astLocation
new ProblemLocation(astFile, astLocation .getEndingLineNumber())
.getStartingLineNumber()), message); 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() { public boolean runInEditor() {
return true; return true;
} }