From 75406c2a365e04d3be42b61c329c48b3d13bc82d Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Wed, 31 Jul 2013 17:56:41 +0200 Subject: SONAR-4515 Display all allowed values for sonar.languages when an invalid one is specified --- .../src/main/java/org/sonar/api/resources/Languages.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sonar-plugin-api/src') 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 map = Maps.newHashMap(); + private final Map 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 allKey() { + return map.keySet(); + } } -- cgit v1.2.3