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

Adjust semantichighlighting test

This commit is contained in:
Anton Leherbauer 2007-12-05 13:10:01 +00:00
parent fe34a52903
commit d56430e527
2 changed files with 6 additions and 3 deletions

View file

@ -170,6 +170,7 @@ public class SemanticHighlightingTest extends AbstractSemanticHighlightingTest {
Position[] expected= new Position[] {
createPosition(11, 20, 1),
createPosition(28, 35, 3),
createPosition(29, 23, 3),
createPosition(30, 19, 3),
createPosition(77, 21, 4),
createPosition(77, 30, 4),

View file

@ -271,12 +271,14 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
addNodeLocation(name.getFileLocation(), highlightingStyle);
} else {
int offset= imageLocation.getNodeOffset();
if (offset >= fMinLocation) {
int length= imageLocation.getNodeLength();
if (offset > -1 && length > 0) {
addPosition(offset, length, highlightingStyle);
}
}
}
}
/**
* Add the a location range for the given highlighting.