boolean (GrExpression expression, GrCall methodCall) { final GrArgumentList list = methodCall.getArgumentList(); assert list != null; final String methodName; if (methodCall instanceof GrMethodCall) { GrExpression invoked = ((GrMethodCall)methodCall).getInvokedExpression(); final String referenceName = invoked instanceof GrReferenceExpression? ((GrReferenceExpression)invoked).getReferenceName() : null; if ("super".equals(referenceName) || "this".equals(referenceName)) { // constructor call final PsiClass psiClass = PsiTreeUtil.getParentOfType(methodCall, PsiClass.class, true); final PsiClass psiTargetClass = "super".equals(referenceName)? psiClass == null ? null : psiClass.getSuperClass() : psiClass; methodName = psiTargetClass == null? null : psiTargetClass.getName(); } else { methodName = referenceName; } } else if (methodCall instanceof GrNewExpression) { final GrCodeReferenceElement classRef = ((GrNewExpression)methodCall).getReferenceElement(); methodName = classRef == null ? null : classRef.getReferenceName(); } else { methodName = null; } if (methodName != null && areThereInjectionsWithName(methodName, false)) { final GroovyResolveResult result = methodCall.advancedResolve(); PsiElement element = result.getElement(); if (element instanceof PsiMethod method) { final PsiParameter[] parameters = method.getParameterList().getParameters(); int index = GrInjectionUtil.findParameterIndex(expression, methodCall); if (index >= 0) { process(parameters[index], method, index); } } } return false; }