void (final String propertyFileName, int offset) { PropertiesFile propFile = (PropertiesFile) myPsiManager.findFile(myTestProjectRoot.findFileByRelativePath(propertyFileName)); assertNotNull(propFile); final Property prop = (Property)propFile.findPropertyByKey("key"); assertNotNull(prop); final Query<PsiReference> query = ReferencesSearch.search(prop); final Collection<PsiReference> result = query.findAll(); assertEquals(1, result.size()); PsiReference reference = ContainerUtil.getFirstItem(result); assertTrue(reference.isReferenceTo(prop)); PsiElement resolved = reference.resolve(); assertNotNull(resolved); assertTrue(prop.isEquivalentTo(resolved)); verifyReference(reference, "form.form", offset); }