aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-05-10 10:09:49 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2016-05-10 14:54:26 +0200
commit25d5a0489a00fe0ecda0716908031f92751bd286 (patch)
tree35cd0f833f8ee28df8c6a86231b2180dc0172fdd /sonar-scanner-engine
parentd4acdfa1b64d285587aa6678579d96333ce4a146 (diff)
downloadsonarqube-25d5a0489a00fe0ecda0716908031f92751bd286.tar.gz
sonarqube-25d5a0489a00fe0ecda0716908031f92751bd286.zip
SONAR-7509 Highlighting API should work with ranges (line/offset)
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/noop/NoOpNewHighlighting.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/noop/NoOpNewHighlighting.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/noop/NoOpNewHighlighting.java
index 7ead32f7f04..c286107ffe7 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/noop/NoOpNewHighlighting.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/noop/NoOpNewHighlighting.java
@@ -20,6 +20,7 @@
package org.sonar.batch.sensor.noop;
import org.sonar.api.batch.fs.InputFile;
+import org.sonar.api.batch.fs.TextRange;
import org.sonar.api.batch.sensor.highlighting.NewHighlighting;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
@@ -30,13 +31,25 @@ public class NoOpNewHighlighting implements NewHighlighting {
}
@Override
- public NewHighlighting onFile(InputFile inputFile) {
+ public NoOpNewHighlighting onFile(InputFile inputFile) {
// Do nothing
return this;
}
@Override
- public NewHighlighting highlight(int startOffset, int endOffset, TypeOfText typeOfText) {
+ public NoOpNewHighlighting highlight(int startOffset, int endOffset, TypeOfText typeOfText) {
+ // Do nothing
+ return this;
+ }
+
+ @Override
+ public NoOpNewHighlighting highlight(int startLine, int startLineOffset, int endLine, int endLineOffset, TypeOfText typeOfText) {
+ // Do nothing
+ return this;
+ }
+
+ @Override
+ public NoOpNewHighlighting highlight(TextRange range, TypeOfText typeOfText) {
// Do nothing
return this;
}