void setPatternsTable(@NotNull Set<FileTypeWithDescriptor> fileTypes, @NotNull FileTypeAssocTable<FileTypeWithDescriptor> assocTable) {
    Map<FileNameMatcher, FileTypeWithDescriptor> removedMappings = getExtensionMap().getRemovedMappings(assocTable, fileTypes);
    String message = "set patterns table called: file types " + fileTypes + ", ass. table:" + assocTable;
    makeFileTypesChange(message, () -> {
      for (FileTypeWithDescriptor existing : getRegisteredFileTypeWithDescriptors()) {
        if (!fileTypes.contains(existing)) {
          schemeManager.removeScheme(existing);
        }
      }
      for (FileTypeWithDescriptor ftd : fileTypes) {
        schemeManager.addScheme(ftd);
        if (ftd.fileType() instanceof AbstractFileType) {
          ((AbstractFileType)ftd.fileType()).initSupport();
        }
      }
      patternsTable = assocTable.copy();
    });

    removedMappingTracker.removeIf(mapping -> {
      String fileTypeName = mapping.getFileTypeName();
      FileTypeWithDescriptor fileType = getFileTypeWithDescriptorByName(fileTypeName);
      FileNameMatcher matcher = mapping.getFileNameMatcher();
      return fileType != null && assocTable.isAssociatedWith(fileType, matcher);
    });
    for (Map.Entry<FileNameMatcher, FileTypeWithDescriptor> entry : removedMappings.entrySet()) {
      removedMappingTracker.add(entry.getKey(), entry.getValue().fileType().getName(), true);
    }
  }
void setPatternsTable(@NotNull Set<FileTypeWithDescriptor> fileTypes, @NotNull FileTypeAssocTable<FileTypeWithDescriptor> assocTable)