void associate(@NotNull FileTypeWithDescriptor ftd, @NotNull FileNameMatcher matcher, boolean fireChange) {
    FileType fileType = ftd.fileType();
    // delete "this matcher is removed from this file type" record
    removedMappingTracker.removeIf(mapping -> matcher.equals(mapping.getFileNameMatcher()) && fileType.getName().equals(mapping.getFileTypeName()));
    if (!patternsTable.isAssociatedWith(ftd, matcher)) {
      Runnable command = () -> patternsTable.addAssociation(matcher, ftd);
      if (fireChange) {
        makeFileTypesChange("file type '" + ftd.fileType() + "' associated with '" + matcher + "'", command);
      }
      else {
        command.run();
      }
    }
  }
void associate(@NotNull FileTypeWithDescriptor ftd, @NotNull FileNameMatcher matcher, boolean fireChange)