void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiMethodCallExpression call = PsiTreeUtil.getParentOfType(element, PsiMethodCallExpression.class); if (call == null) return; PsiExpression qualifierExpression = call.getMethodExpression().getQualifierExpression(); if (qualifierExpression == null) { return; } CommentTracker ct = new CommentTracker(); String text = ct.text(qualifierExpression) + "." + myNewMethodName; PsiExpression[] expressions = call.getArgumentList().getExpressions(); StringJoiner joiner = new StringJoiner(",", "(", ")"); for (int i = 0; i < expressions.length; i++) { if (i == myDeletedArgumentIndex) { continue; } joiner.add(ct.text(expressions[i])); } text += joiner.toString(); ct.replaceAndRestoreComments(call, text); }