void (final PsiMethod method, final ArrayList<UsageInfo> result) { for (PsiReference ref : ReferencesSearch.search(method)) { PsiElement element = ref.getElement(); PsiElement qualifier = null; if (element instanceof PsiReferenceExpression) { qualifier = ((PsiReferenceExpression)element).getQualifierExpression(); if (qualifier instanceof PsiThisExpression) qualifier = null; } if (!PsiTreeUtil.isAncestor(myMember, element, true) || qualifier != null) { result.add(new PsiElementUsageInfo(element)); } processExternalReference(element, method, result); } }