void () { PsiFile psiFile = PsiManager.getInstance(project).findFile(virtualFile); if (psiFile != null) { psiFile.accept(new JavaRecursiveElementWalkingVisitor() { @Override public void visitClass(@NotNull PsiClass candidate) { ProgressManager.checkCanceled(); PsiMethod overridingMethod = candidate.isInheritor(methodContainingClass, true) ? findOverridingMethod(candidate, method, methodContainingClass) : null; if (overridingMethod != null && !consumer.process(overridingMethod)) { success[0] = false; stopWalking(); } else { super.visitClass(candidate); } } }); } }