private static @Nullable String resolveSchemaFile(@NotNull VirtualFile file, @NotNull VirtualFile catalogFile, @NotNull Project project) {
    JsonFileResolver.startFetchingHttpFileIfNeeded(catalogFile, project);

    List<JsonSchemaCatalogEntry> schemaCatalog = JsonCachedValues.getSchemaCatalog(catalogFile, project);
    if (schemaCatalog == null) return catalogFile instanceof HttpVirtualFile ? NO_CACHE : null;

    List<FileMatcher> fileMatchers = ContainerUtil.map(schemaCatalog, entry -> new FileMatcher(entry));

    String fileRelativePathStr = getRelativePath(file, project);
    String url = findMatchedUrl(fileMatchers, fileRelativePathStr);
    if (url == null) {
      String fileName = file.getName();
      if (!fileName.equals(fileRelativePathStr)) {
        url = findMatchedUrl(fileMatchers, fileName);
      }
    }
    return url;
  }
private static @Nullable String resolveSchemaFile(@NotNull VirtualFile file, @NotNull VirtualFile catalogFile, @NotNull Project project)