PsiElement originalElement = psiElement.getUserData(PsiUtil.ORIGINAL_KEY);
if (originalElement != null) {
psiElement = originalElement;
}
final XmlTag tag = PsiTreeUtil.getParentOfType(psiElement, XmlTag.class, false);
<BUG>DomElement domElement = DomManager.getDomManager(psiElement.getManager().getProject()).getDomElement(tag);

if (domElement == null) {</BUG>
return PsiReference.EMPTY_ARRAY;
}

PsiElement originalElement = psiElement.getUserData(PsiUtil.ORIGINAL_KEY);
if (originalElement != null) {
psiElement = originalElement;
}
final XmlTag tag = PsiTreeUtil.getParentOfType(psiElement, XmlTag.class, false);
final DomManager domManager = DomManager.getDomManager(psiElement.getManager().getProject());
DomElement domElement = domManager.getDomElement(tag);
if (domElement == null) {
return PsiReference.EMPTY_ARRAY;
}
