List<FileType> () { List<FileType> fileTypes = new ArrayList<>(); for (String name : OSFileAssociationPreferences.getInstance().fileTypeNames) { if (name.contains(EXTENSION_SEPARATOR)) { int extPos = name.indexOf(EXTENSION_SEPARATOR); String originalName = name.substring(0, extPos); String extension = name.substring(extPos + EXTENSION_SEPARATOR.length()); FileType originalType = getFileTypeByName(originalName); if (originalType != null) { for (FileNameMatcher matcher : FileTypeManager.getInstance().getAssociations(originalType)) { if (matcher instanceof ExtensionFileNameMatcher) { if (extension.equals(((ExtensionFileNameMatcher)matcher).getExtension())) { fileTypes.add(new MyFileSubtype(originalType, matcher, name, matcher.getPresentableString())); } } } } } else { FileType type = getFileTypeByName(name); if (type != null) { fileTypes.add(type); } } } return fileTypes; }