private @NotNull FileType mergeOrInstantiateFileTypeBean(@NotNull FileTypeBean fileTypeBean) {
    StandardFileType type = withReadLock(() -> standardFileTypes.get(fileTypeBean.name));
    if (type == null) {
      return getFileTypeOrUnknown(instantiateFileTypeBean(fileTypeBean));
    }
    type.matchers.addAll(fileTypeBean.getMatchers());
    for (FileNameMatcher matcher : fileTypeBean.getMatchers()) {
      patternsTable.addAssociation(matcher, type.getDescriptor());
    }
    return type.fileType;
  }
private @NotNull FileType mergeOrInstantiateFileTypeBean(@NotNull FileTypeBean fileTypeBean)