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