GroovyResolveResult (GrMethod constructor) { LOG.assertTrue(constructor.isConstructor()); final GrConstructorInvocation constructorInvocation = PsiImplUtil.getChainingConstructorInvocation(constructor); if (constructorInvocation == null) { return null; } GroovyResolveResult resolveResult = constructorInvocation.advancedResolve(); if (resolveResult.getElement() != null) { return resolveResult; } final GroovyResolveResult[] results = constructorInvocation.multiResolve(false); if (results.length > 0) { int i = 0; while (results.length > i + 1) { final PsiMethod candidate = (PsiMethod)results[i].getElement(); final PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(constructor.getProject()).getResolveHelper(); if (candidate != null && candidate != constructor && resolveHelper.isAccessible(candidate, constructorInvocation, null)) { break; } i++; } return results[i]; } return null; }