List<String> (LanguageFileType fileType) { List<FileNameMatcher> associations = FileTypeManager.getInstance().getAssociations(fileType); List<String> extensions = new ArrayList<>(); extensions.add(StringUtil.toLowerCase(fileType.getDefaultExtension())); for (FileNameMatcher matcher : associations) { String presentableString = StringUtil.toLowerCase(matcher.getPresentableString()); if (presentableString.startsWith("*.")) { String ext = presentableString.substring(2); if (!ext.isEmpty() && !extensions.contains(ext) && EXT_PATTERN.matcher(ext).matches()) { extensions.add(ext); } } } return extensions; }