correctly read file type settings when a predefined extension was remapped to another file type (IDEA-89509)

This commit is contained in:
peter
2012-08-28 17:57:15 +02:00
parent 4a93818319
commit a2fdb7f7d1
@@ -283,6 +283,10 @@ public class FileTypeManagerImpl extends FileTypeManagerEx implements NamedJDOME
for (final StandardFileType pair : myStandardFileTypes.values()) {
registerFileTypeWithoutNotification(pair.fileType, pair.matchers);
}
// Resolve unresolved mappings initialized before certain plugin initialized.
for (final StandardFileType pair : myStandardFileTypes.values()) {
bindUnresolvedMappings(pair.fileType);
}
if (loadAllFileTypes()) {
restoreStandardFileExtensions();
}
@@ -841,7 +845,9 @@ public class FileTypeManagerImpl extends FileTypeManagerEx implements NamedJDOME
mySpecialFileTypes.add((FileTypeIdentifiableByVirtualFile)fileType);
}
// Resolve unresolved mappings initialized before certain plugin initialized.
}
private void bindUnresolvedMappings(FileType fileType) {
for (FileNameMatcher matcher : new THashSet<FileNameMatcher>(myUnresolvedMappings.keySet())) {
String name = myUnresolvedMappings.get(matcher);
if (Comparing.equal(name, fileType.getName())) {