diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-14 23:54:44 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-14 23:58:01 +0100 |
commit | c8ca6faa8530fc6e1b42422b48500c82d6705c80 (patch) | |
tree | 4f98846b4e8df6b0702d470fdee32ed0fbdebd9d /sonar-plugin-api/src/main/java/org/sonar/api/Property.java | |
parent | f0e02076c17318fed53983bbff3bce5d820c06b1 (diff) | |
download | sonarqube-c8ca6faa8530fc6e1b42422b48500c82d6705c80.tar.gz sonarqube-c8ca6faa8530fc6e1b42422b48500c82d6705c80.zip |
SONAR-1378 Add the ability to specify a "type" when defining a plugin property
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/Property.java')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/Property.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java index d0506e0418b..b48b0f5ec5a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java @@ -46,6 +46,13 @@ import java.lang.annotation.Target; public @interface Property { /** + * @since 2.15 + */ + public static enum Type { + STRING, TEXT, PASSWORD, BOOLEAN, INTEGER, FLOAT, SINGLE_SELECT_LIST + } + + /** * Unique key within all plugins. It's recommended to prefix the key by 'sonar.' and the plugin name. Examples : * 'sonar.cobertura.reportPath' and 'sonar.cpd.minimumTokens'. */ @@ -76,4 +83,17 @@ public @interface Property { * Is the property displayed in global settings page ? */ boolean global() default true; + + /** + * @since 2.15 + */ + Type type() default Type.STRING; + + /** + * Options for *_LIST types + * + * @since 2.15 + */ + String[] options() default {}; + } |