diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-10-08 11:48:20 +0200 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-10-08 16:14:52 +0200 |
commit | a4ac34cfc3057e74095b688065950ba7684765f7 (patch) | |
tree | 4fe92fba7e1d1136117ca19688e8fd211c0bd08b | |
parent | 3cee12889f13ab2784cf2db9138a7a417e8e4097 (diff) | |
download | sonarqube-a4ac34cfc3057e74095b688065950ba7684765f7.tar.gz sonarqube-a4ac34cfc3057e74095b688065950ba7684765f7.zip |
SONAR-3651 Make the "Custom Measure" widget support diff. views
-rw-r--r-- | plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java index e1c8cdde530..5ef27cdb110 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java @@ -19,22 +19,25 @@ */ package org.sonar.plugins.core.widgets; -import org.sonar.api.web.*; +import org.sonar.api.web.AbstractRubyTemplate; +import org.sonar.api.web.RubyRailsWidget; +import org.sonar.api.web.WidgetProperties; +import org.sonar.api.web.WidgetProperty; +import org.sonar.api.web.WidgetPropertyType; @WidgetProperties( - { - @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric4", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric5", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric6", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric7", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric8", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric9", type = WidgetPropertyType.METRIC), - @WidgetProperty(key = "metric10", type = WidgetPropertyType.METRIC) - } -) +{ + @WidgetProperty(key = "metric1", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric2", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric3", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric4", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric5", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric6", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric7", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric8", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric9", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}), + @WidgetProperty(key = "metric10", type = WidgetPropertyType.METRIC, options = {WidgetsConstants.FILTER_OUT_NEW_METRICS}) +}) public class CustomMeasuresWidget extends AbstractRubyTemplate implements RubyRailsWidget { public String getId() { return "custom_measures"; @@ -48,4 +51,4 @@ public class CustomMeasuresWidget extends AbstractRubyTemplate implements RubyRa protected String getTemplatePath() { return "/org/sonar/plugins/core/widgets/custom_measures.html.erb"; } -}
\ No newline at end of file +} |