private static void removeParametersFromCall(
     GrMethodCallExpression methodCall, GrIntroduceParameterSettings settings) {
   final GroovyResolveResult resolveResult = methodCall.advancedResolve();
   final PsiElement resolved = resolveResult.getElement();
   LOG.assertTrue(resolved instanceof PsiMethod);
   final GrClosureSignature signature =
       GrClosureSignatureUtil.createSignature(
           (PsiMethod) resolved, resolveResult.getSubstitutor());
   final GrClosureSignatureUtil.ArgInfo<PsiElement>[] argInfos =
       GrClosureSignatureUtil.mapParametersToArguments(signature, methodCall);
   LOG.assertTrue(argInfos != null);
   settings
       .parametersToRemove()
       .forEach(
           new TIntProcedure() {
             @Override
             public boolean execute(int value) {
               final List<PsiElement> args = argInfos[value].args;
               for (PsiElement arg : args) {
                 arg.delete();
               }
               return true;
             }
           });
 }
 @NotNull
 @Override
 public TIntArrayList getParametersToRemove() {
   return mySettings.parametersToRemove();
 }