GrSignature (GrCall call) { if (call instanceof GrMethodCall) { final GrExpression invokedExpression = ((GrMethodCall)call).getInvokedExpression(); final PsiType type = invokedExpression.getType(); if (type instanceof GroovyClosureType) { Collection<CallSignature<?>> signatures = ((GroovyClosureType)type).applicableSignatures(ArgumentsKt.getArguments(call)); if (signatures.size() == 1) { return new GrCallSignatureAdapter(ContainerUtil.getFirstItem(signatures)); } } } final GroovyResolveResult resolveResult = call.advancedResolve(); final PsiElement element = resolveResult.getElement(); if (element instanceof PsiMethod) { return createSignature((PsiMethod)element, resolveResult.getSubstitutor()); } return null; }