private static PsiReference @NotNull [] doCreateReferences(GenericDomValue<?> domValue,
                                                             XmlElement psiElement,
                                                             Object converter,
                                                             ConvertContext context) {
    if (converter instanceof CustomReferenceConverter) {
      //noinspection unchecked
      final PsiReference[] references = ((CustomReferenceConverter)converter).createReferences(domValue, psiElement, context);
      if (references.length != 0 || !(converter instanceof ResolvingConverter)) {
        return references;
      }
    }

    if (converter instanceof ResolvingConverter) {
      //noinspection unchecked
      return new PsiReference[]{new GenericDomValueReference(domValue)};
    }
    return PsiReference.EMPTY_ARRAY;
  }
private static PsiReference @NotNull [] doCreateReferences(GenericDomValue<?> domValue,
                                                             XmlElement psiElement,
                                                             Object converter,
                                                             ConvertContext context)