void (@NotNull InsertionContext context, @Nullable PsiCallExpression call) { context.commitDocument(); PsiDocumentManager.getInstance(context.getProject()).doPostponedOperationsAndUnblockDocument(context.getDocument()); if (call != null) { PsiExpressionList list = call.getArgumentList(); if (list != null) { TextRange argumentList = list.getTextRange(); String text = myOldQualifierExpression.getText(); boolean hasOneArgument = ContainerUtil.exists(myMethods, method -> method.getParameterList().getParameters().length == 1); if (!hasOneArgument) { CommonCodeStyleSettings codeStyleSettings = CodeStyle.getLanguageSettings(myOldQualifierExpression.getContainingFile()); text += ","; if (codeStyleSettings.SPACE_AFTER_COMMA) { text += " "; } } context.getDocument().insertString(argumentList.getStartOffset() + 1, text); context.getEditor().getCaretModel().moveToOffset(argumentList.getStartOffset() + 1 + text.length()); } } }