void (@NotNull FileType fileType) { PluginDescriptor pluginDescriptor = findPluginDescriptor(fileType); FileTypeWithDescriptor ftd = FileTypeWithDescriptor.allFor(fileType); List<FileNameMatcher> matchers = myPatternsTable.getAssociations(ftd); // delete all records "extension xxx is removed from standard type X because the new fileType grabbed it to itself" myRemovedMappingTracker.removeIf(mapping -> mapping.getFileTypeName().equals(fileType.getName()) || matchers.contains(mapping.getFileNameMatcher())); myPatternsTable.removeAllAssociations(ftd); myInitialAssociations.removeAllAssociations(fileType); mySchemeManager.removeScheme(fileType.getName()); if (fileType instanceof FileTypeIdentifiableByVirtualFile fakeFileType) { mySpecialFileTypes = ArrayUtil.remove(mySpecialFileTypes, fakeFileType, FileTypeIdentifiableByVirtualFile.ARRAY_FACTORY); } if (pluginDescriptor != null) { removeFromDuplicates(fileType, pluginDescriptor); } }