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[] { Position[] expected= new Position[] {
createPosition(11, 20, 1), createPosition(11, 20, 1),
createPosition(28, 35, 3), createPosition(28, 35, 3),
createPosition(29, 23, 3),
createPosition(30, 19, 3), createPosition(30, 19, 3),
createPosition(77, 21, 4), createPosition(77, 21, 4),
createPosition(77, 30, 4), createPosition(77, 30, 4),

View file

@ -271,9 +271,11 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
addNodeLocation(name.getFileLocation(), highlightingStyle); addNodeLocation(name.getFileLocation(), highlightingStyle);
} else { } else {
int offset= imageLocation.getNodeOffset(); int offset= imageLocation.getNodeOffset();
int length= imageLocation.getNodeLength(); if (offset >= fMinLocation) {
if (offset > -1 && length > 0) { int length= imageLocation.getNodeLength();
addPosition(offset, length, highlightingStyle); if (offset > -1 && length > 0) {
addPosition(offset, length, highlightingStyle);
}
} }
} }
} }