void () { PsiClass aClass = myJavaFacade.findClass("B", GlobalSearchScope.allScope(myProject)); PsiMethod constructor = aClass.findMethodsByName("B", false)[0]; PsiMethodCallExpression superCall = (PsiMethodCallExpression) constructor.getBody().getStatements()[0].getFirstChild(); PsiReferenceExpression superExpr = superCall.getMethodExpression(); String[] fileNames = {"B.java", "A.java", "A.java", "B.java"}; int[] starts = {}; int[] ends = {}; final ArrayList<PsiFile> filesList = new ArrayList<>(); final IntList startsList = new IntArrayList(); final IntList endsList = new IntArrayList(); PsiReference[] refs = MethodReferencesSearch.search((PsiMethod)superExpr.resolve(), GlobalSearchScope.projectScope(myProject), false).toArray(PsiReference.EMPTY_ARRAY); for (PsiReference ref : refs) { addReference(ref, filesList, startsList, endsList); } checkResult(fileNames, filesList, starts, startsList, ends, endsList); }