void (GrExpression[] exprs, GrNamedArgument[] namedArgs, GrClosableBlock[] closures, GroovyPsiElement context, PsiSubstitutor substitutor) { myBuilder.append('('); if (namedArgs.length > 0) { final GrExpression listOrMap = GroovyRefactoringUtil.generateArgFromMultiArg(substitutor, Arrays.asList(namedArgs), null, context.getProject()); LOG.assertTrue(listOrMap instanceof GrListOrMap); listOrMap.accept(myExpressionGenerator); myBuilder.append(", "); } for (GrExpression expr : exprs) { expr.accept(myExpressionGenerator); myBuilder.append(", "); } for (GrClosableBlock closure : closures) { closure.accept(myExpressionGenerator); myBuilder.append(", "); } if (namedArgs.length + exprs.length + closures.length > 0) { myBuilder.delete(myBuilder.length()-2, myBuilder.length()); //myBuilder.removeFromTheEnd(2); } myBuilder.append(')'); }