diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2016-05-12 11:37:30 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2016-05-12 15:19:59 +0200 |
commit | f35b6148731dd11734e57d73dd1cfc182de58b12 (patch) | |
tree | f33cb810c0bfc674fd95ae0b186ecbd23dfeaa3a /sonar-scanner-engine/src | |
parent | d8845c6f438cee268fa4268a6a6503c54330bdda (diff) | |
download | sonarqube-f35b6148731dd11734e57d73dd1cfc182de58b12.tar.gz sonarqube-f35b6148731dd11734e57d73dd1cfc182de58b12.zip |
SONAR-7509 Backport on old API to ease migration
Diffstat (limited to 'sonar-scanner-engine/src')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/batch/source/DefaultHighlightable.java | 13 |
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(); } |