]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3651 Make the "Custom Measure" widget support diff. views
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 8 Oct 2012 09:48:20 +0000 (11:48 +0200)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 8 Oct 2012 14:14:52 +0000 (16:14 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/CustomMeasuresWidget.java

index e1c8cdde5300b7ecb88cb3e37d0009f5869d5c86..5ef27cdb110105039da85d08e52e7cd9958ace1b 100644 (file)
  */
 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
+}