private static @InspectionMessage String getReferenceErrorDesc(PsiReference reference) {
        final String text = reference.getCanonicalText();
        if (reference instanceof FileReference) {
          final int hash = text.indexOf('#');
          return JsonBundle.message("json.schema.ref.file.not.found", hash == -1 ? text : text.substring(0, hash));
        }
        if (reference instanceof JsonPointerReferenceProvider.JsonSchemaIdReference) {
          return JsonBundle.message("json.schema.ref.cannot.resolve.id", text);
        }
        final int lastSlash = text.lastIndexOf('/');
        if (lastSlash == -1) {
          return JsonBundle.message("json.schema.ref.cannot.resolve.path", text);
        }
        final String substring = text.substring(text.lastIndexOf('/') + 1);

        try {
          Integer.parseInt(substring);
          return JsonBundle.message("json.schema.ref.no.array.element", substring);
        }
        catch (Exception e) {
          return JsonBundle.message("json.schema.ref.no.property", substring);
        }
      }
private static @InspectionMessage String getReferenceErrorDesc(PsiReference reference)