void () { myTestFixture.copyFileToProject("include.rng"); final PsiReference ref = myTestFixture.getReferenceAtCaretPositionWithAssertion("resolve-include-ref-2.rng"); assertTrue("PolyVariantRef", ref instanceof PsiPolyVariantReference); final PsiElement element = ref.resolve(); assertNull(element); final ResolveResult[] results = ((PsiPolyVariantReference)ref).multiResolve(false); assertEquals(2, results.length); for (ResolveResult result : results) { PsiElement e = result.getElement(); assertTrue(e instanceof XmlTag); final int contentLength = ((XmlTag)e).getSubTags().length; if (e.getContainingFile() == ref.getElement().getContainingFile()) { assertEquals(1, contentLength); } else { assertEquals(0, contentLength); } } }