void (final ArrayList<UsageInfo> result) { for (PsiReference ref : ReferencesSearch.search(myMember)) { PsiElement element = ref.getElement(); if (element.getParent() instanceof PsiNewExpression newExpression) { PsiElement qualifier = newExpression.getQualifier(); if (qualifier instanceof PsiThisExpression) qualifier = null; if (!PsiTreeUtil.isAncestor(myMember, element, true) || qualifier != null) { result.add(new UsageInfo(element)); } else { result.add(new InternalUsageInfo(element, myMember)); } } } }