private static FileType preferDetectedByContent(@NotNull FileType fromContent, @Nullable FileType fileTypeByName) {
    return fromContent == PlainTextFileType.INSTANCE && fileTypeByName == DetectedByContentFileType.INSTANCE
           ? DetectedByContentFileType.INSTANCE : fromContent;
  }
private static FileType preferDetectedByContent(@NotNull FileType fromContent, @Nullable FileType fileTypeByName)