aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
index 4fd661a7dfb..90fe3ea39fe 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
@@ -37,4 +37,18 @@ public @interface WidgetProperty {
String description() default "";
boolean optional() default true;
+
+ /**
+ * Options for property of type WidgetPropertyType.METRIC</code>.
+ *
+ * If no option is specified, any metric will match.
+ * If options are specified, all must match for the metric to be displayed.
+ * Three types of filter are supported <code>key:REGEXP</code>, <code>domain:REGEXP</code> and <code>type:comma_separated__list_of_types</code>.
+ * For example <code>key:new_.*</code> will match any metric which key starts by <code>new_</code>.
+ * For example <code>type:INT,FLOAT</code> will match any metric of type <code>INT</code> or <code>FLOAT</code>.
+ * For example <code>type:NUMERIC</code> will match any metric of numerictype.
+ *
+ * @since 3.3
+ */
+ String[] options() default {};
}