void (@NotNull TextMateBundleReader reader, @NotNull Map<TextMateFileNameMatcher, CharSequence> extensionMapping) { Iterator<TextMateGrammar> grammarIterator = reader.readGrammars().iterator(); while (grammarIterator.hasNext()) { TextMateGrammar grammar = grammarIterator.next(); CharSequence rootScopeName = mySyntaxTable.loadSyntax(grammar.getPlist().getValue(), myInterner); if (rootScopeName != null) { for (TextMateFileNameMatcher fileNameMatcher : grammar.getFileNameMatchers()) { if (fileNameMatcher instanceof TextMateFileNameMatcher.Name) { String newName = StringUtil.toLowerCase(((TextMateFileNameMatcher.Name)fileNameMatcher).getFileName()); extensionMapping.put(((TextMateFileNameMatcher.Name)fileNameMatcher).copy(newName), rootScopeName); } else { extensionMapping.put(fileNameMatcher, rootScopeName); } } } } }