PsiReference[] () { PsiElement element = TargetElementUtil.findTargetElement(myEditor, TargetElementUtil .ELEMENT_NAME_ACCEPTED | TargetElementUtil.REFERENCED_ELEMENT_ACCEPTED); final PsiReference[] references = ReferencesSearch.search(element, GlobalSearchScope.allScope(myProject), true).toArray(PsiReference.EMPTY_ARRAY); return references; }