List<FileType> (@NotNull FileType originalType) { List<FileType> subtypes = new ArrayList<>(); for (FileNameMatcher matcher : FileTypeManager.getInstance().getAssociations(originalType)) { if (matcher instanceof ExtensionFileNameMatcher) { String name = ((ExtensionFileNameMatcher)matcher).getExtension().equals(originalType.getDefaultExtension()) ? originalType.getName() : getSubtypeName(originalType.getName(), (ExtensionFileNameMatcher)matcher); subtypes.add(new MyFileSubtype(originalType, matcher, name, matcher.getPresentableString())); } } return subtypes; }