PsiReference (final GenericDomValue value, PsiElement resolveTo, int offset) { final XmlTag tag = value.getXmlTag(); final PsiReference reference = tag.getContainingFile().findReferenceAt(offset); assertNotNull(reference); reference.getVariants(); assertEquals(resolveTo, reference.resolve()); return reference; }