diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-09-15 16:50:12 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-09-17 16:48:24 +0200 |
commit | ce60ac8d2e137f33bb111668e54e78c195c73d79 (patch) | |
tree | 7a99ab075ee9c85ec71cfa5ee65c2aed794feb04 /sonar-plugin-api/src | |
parent | 0d1b0b7a200c12d6f966cf1d7e7ec23d3db30760 (diff) | |
download | sonarqube-ce60ac8d2e137f33bb111668e54e78c195c73d79.tar.gz sonarqube-ce60ac8d2e137f33bb111668e54e78c195c73d79.zip |
No op for highlighting and symbol references in issues mode
Diffstat (limited to 'sonar-plugin-api/src')
3 files changed, 6 insertions, 9 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java index 50019d5eadd..9a99185d4af 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java @@ -27,6 +27,9 @@ package org.sonar.api.batch; public interface AnalysisMode { boolean isPreview(); + /** + * @since 5.2 + */ boolean isIssues(); boolean isPublish(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java index 1f1333a65bf..faf3f7536ec 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlighting.java @@ -25,7 +25,6 @@ import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.List; -import javax.annotation.Nullable; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.TextRange; import org.sonar.api.batch.fs.internal.DefaultInputFile; @@ -36,14 +35,10 @@ import org.sonar.api.batch.sensor.internal.SensorStorage; public class DefaultHighlighting extends DefaultStorable implements NewHighlighting { + private final List<SyntaxHighlightingRule> syntaxHighlightingRules; private DefaultInputFile inputFile; - private List<SyntaxHighlightingRule> syntaxHighlightingRules; - public DefaultHighlighting() { - this(null); - } - - public DefaultHighlighting(@Nullable SensorStorage storage) { + public DefaultHighlighting(SensorStorage storage) { super(storage); syntaxHighlightingRules = new ArrayList<>(); } diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlightingTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlightingTest.java index acd24d674cb..76378512ff5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlightingTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/sensor/highlighting/internal/DefaultHighlightingTest.java @@ -19,6 +19,7 @@ */ package org.sonar.api.batch.sensor.highlighting.internal; +import java.util.Collection; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -29,8 +30,6 @@ import org.sonar.api.batch.fs.internal.DefaultTextPointer; import org.sonar.api.batch.fs.internal.DefaultTextRange; import org.sonar.api.batch.sensor.internal.SensorStorage; -import java.util.Collection; - import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.sonar.api.batch.sensor.highlighting.TypeOfText.COMMENT; |