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:
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) {
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue