aboutsummaryrefslogtreecommitdiffstats
path: root/it
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-03-16 21:52:47 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-03-18 10:13:42 +0100
commitb5f917337a9373d801f63910214d8ce4be53afdd (patch)
tree2c34473d1915466faf27b30379a71b98307b14c8 /it
parentcfcbe278f7ced12599d898d50f3fe68bfbf95155 (diff)
downloadsonarqube-b5f917337a9373d801f63910214d8ce4be53afdd.tar.gz
sonarqube-b5f917337a9373d801f63910214d8ce4be53afdd.zip
SONAR-7459 new interface org.sonar.api.Plugin
It allows to check version of SonarQube to filter extensions
Diffstat (limited to 'it')
-rw-r--r--it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java b/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java
index 2be444b22a3..5bc5ee622af 100644
--- a/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java
+++ b/it/it-plugins/batch-plugin/src/main/java/com/sonarsource/BatchPlugin.java
@@ -23,14 +23,15 @@ import com.sonarsource.decimal_scale_of_measures.DecimalScaleMeasureComputer;
import com.sonarsource.decimal_scale_of_measures.DecimalScaleMetric;
import com.sonarsource.decimal_scale_of_measures.DecimalScaleProperty;
import com.sonarsource.decimal_scale_of_measures.DecimalScaleSensor;
-import java.util.Arrays;
-import java.util.List;
-import org.sonar.api.SonarPlugin;
+import org.sonar.api.Plugin;
-public class BatchPlugin extends SonarPlugin {
+import static java.util.Arrays.asList;
- public List getExtensions() {
- return Arrays.asList(
+public class BatchPlugin implements Plugin {
+
+ @Override
+ public void define(Context context) {
+ context.addExtensions(asList(
// SONAR-6939 decimal_scale_of_measures
DecimalScaleMeasureComputer.class,
DecimalScaleMetric.class,
@@ -40,7 +41,7 @@ public class BatchPlugin extends SonarPlugin {
DumpSettingsInitializer.class,
RaiseMessageException.class,
TempFolderExtension.class,
- WaitingSensor.class);
+ WaitingSensor.class
+ ));
}
-
}