private static PsiReference @NotNull [] getReferences(CompletionParameters parameters) {
    PsiElement psiElement = parameters.getPosition().getParent();
    return psiElement instanceof XmlText ? psiElement.getParent().getReferences() : psiElement.getReferences();
  }
private static PsiReference @NotNull [] getReferences(CompletionParameters parameters)