@Override
  public PsiReference @NotNull [] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context) {
    if (!(element instanceof JsonStringLiteral)) return PsiReference.EMPTY_ARRAY;
    List<PsiReference> refs = new ArrayList<>();

    List<Pair<TextRange, String>> fragments = ((JsonStringLiteral)element).getTextFragments();
    if (fragments.size() != 1) return PsiReference.EMPTY_ARRAY;
    Pair<TextRange, String> fragment = fragments.get(0);
    String originalText = element.getText();
    int hash = originalText.indexOf('#');
    final JsonSchemaVariantsTreeBuilder.SchemaUrlSplitter splitter = new JsonSchemaVariantsTreeBuilder.SchemaUrlSplitter(fragment.second);
    String id = splitter.getSchemaId();
    if (id != null) {
      if (id.startsWith("#")) {
        refs.add(new JsonSchemaIdReference((JsonValue)element, id));
      }
      else {
        addFileOrWebReferences(element, refs, hash, id);
      }
    }
    if (!myIsSchemaProperty) {
      String relativePath = normalizeSlashes(normalizeId(splitter.getRelativePath()));
      if (!StringUtil.isEmpty(relativePath)) {
        List<String> parts1 = split(relativePath);
        String[] strings = ContainerUtil.toArray(parts1, String[]::new);
        List<String> parts2 = split(normalizeSlashes(originalText.substring(hash + 1)));
        if (strings.length == parts2.size()) {
          int start = hash + 2;
          for (int i = 0; i < parts2.size(); i++) {
            int length = parts2.get(i).length();
            if (i == parts2.size() - 1) length--;
            if (length <= 0) break;
            refs.add(new JsonPointerReference((JsonValue)element, new TextRange(start, start + length),
                                              (id == null ? "" : id) + "#/" + StringUtil.join(strings, 0, i + 1, "/")));
            start += length + 1;
          }
        }
      }
    }
    return refs.size() == 0 ? PsiReference.EMPTY_ARRAY : ContainerUtil.toArray(refs, PsiReference[]::new);
  }
@Override
  public PsiReference @NotNull [] getReferencesByElement(@NotNull PsiElement element, @NotNull ProcessingContext context)