aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine/src
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-scanner-engine/src')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/batch/source/DefaultHighlightable.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/source/DefaultHighlightable.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/source/DefaultHighlightable.java
index 80403efc298..52e56e4703b 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/batch/source/DefaultHighlightable.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/source/DefaultHighlightable.java
@@ -60,6 +60,12 @@ public class DefaultHighlightable implements Highlightable {
}
@Override
+ public HighlightingBuilder highlight(int startLine, int startLineOffset, int endLine, int endLineOffset, String typeOfText) {
+ // Do nothing
+ return this;
+ }
+
+ @Override
public void done() {
// Do nothing
}
@@ -81,6 +87,13 @@ public class DefaultHighlightable implements Highlightable {
}
@Override
+ public HighlightingBuilder highlight(int startLine, int startLineOffset, int endLine, int endLineOffset, String typeOfText) {
+ TypeOfText type = org.sonar.api.batch.sensor.highlighting.TypeOfText.forCssClass(typeOfText);
+ defaultHighlighting.highlight(startLine, startLineOffset, endLine, endLineOffset, type);
+ return this;
+ }
+
+ @Override
public void done() {
defaultHighlighting.save();
}