void () { final MyElement element = createElement("<a><jvm-psi-type>[Ljava.lang.String;</jvm-psi-type></a>"); final XmlTag tag = element.getJvmPsiType().getXmlTag(); final TextRange valueRange = tag.getValue().getTextRange(); final PsiReference reference = tag.getContainingFile().findReferenceAt(valueRange.getEndOffset() - 1); assertNotNull(reference); assertEquals(PsiType.getJavaLangString(getPsiManager(), GlobalSearchScope.allScope(getProject())).resolve(), reference.resolve()); assertEquals("<jvm-psi-type>[Ljava.lang.".length(), reference.getRangeInElement().getStartOffset()); assertEquals("String".length(), reference.getRangeInElement().getLength()); }