Collection<PsiMethod> (GrMethod method, JComponent component) { //collect all overriding methods (including fields with implicit accessors and method with default parameters) final PsiElementProcessor.CollectElementsWithLimit<PsiMethod> collectProcessor = new PsiElementProcessor.CollectElementsWithLimit<>(2, new HashSet<>()); for (GrMethod m : PsiImplUtil.getMethodOrReflectedMethods(method)) { OverridingMethodsSearch.search(m).forEach(new ReadActionProcessor<>() { @Override public boolean processInReadAction(PsiMethod psiMethod) { if (psiMethod instanceof GrReflectedMethod) { psiMethod = ((GrReflectedMethod)psiMethod).getBaseMethod(); } return collectProcessor.execute(psiMethod); } }); } return collectProcessor.getCollection(); }