private static JavaCompletionData getCompletionData(LanguageLevel level) { final Set<Map.Entry<LanguageLevel, JavaCompletionData>> entries = ourCompletionData.entrySet(); for (Map.Entry<LanguageLevel, JavaCompletionData> entry : entries) { if (entry.getKey().isAtLeast(level)) return entry.getValue(); } return ourCompletionData.get(LanguageLevel.JDK_1_3); }
static { ourCompletionData = new LinkedHashMap<LanguageLevel, JavaCompletionData>(); ourCompletionData.put(LanguageLevel.JDK_1_8, new Java18CompletionData()); ourCompletionData.put(LanguageLevel.JDK_1_5, new Java15CompletionData()); ourCompletionData.put(LanguageLevel.JDK_1_3, new JavaCompletionData()); }