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:
parent
e5c11f21e8
commit
0e300b754c
1 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue