summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2013-07-31 17:56:41 +0200
committerJulien HENRY <julien.henry@sonarsource.com>2013-07-31 17:57:58 +0200
commit75406c2a365e04d3be42b61c329c48b3d13bc82d (patch)
tree40c3b6495c871abe88769ec5ed4a75f7f4f29dce /sonar-plugin-api/src
parent7a5ab75342d6c49feca5621d75035e9d136a2df0 (diff)
downloadsonarqube-75406c2a365e04d3be42b61c329c48b3d13bc82d.tar.gz
sonarqube-75406c2a365e04d3be42b61c329c48b3d13bc82d.zip
SONAR-4515 Display all allowed values for sonar.languages when an invalid one is specified
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java
index ee474041bc4..96dd3701751 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java
@@ -28,6 +28,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* A class to store the list of languages
@@ -36,7 +37,7 @@ import java.util.Map;
*/
public class Languages implements BatchComponent, ServerComponent {
- private final Map<String, Language> map = Maps.newHashMap();
+ private final Map<String, Language> map = Maps.newLinkedHashMap();
/**
* Creates a list of languages
@@ -81,4 +82,12 @@ public class Languages implements BatchComponent, ServerComponent {
public void add(Language language) {
map.put(language.getKey(), language);
}
+
+ /**
+ * @return list of all available language keys
+ * @since 4.0
+ */
+ public Set<String> allKey() {
+ return map.keySet();
+ }
}