void (@NotNull PsiMethodCallExpression stringFormat) { final PsiElement parent = PsiUtil.skipParenthesizedExprUp(stringFormat.getParent()); if (parent instanceof PsiExpressionList && ((PsiExpressionList)parent).getExpressionCount() == 1 && parent.getParent() instanceof PsiMethodCallExpression printCall){ final PsiExpression[] args = stringFormat.getArgumentList().getExpressions(); if (args.length > 1) { new CommentTracker().deleteAndRestoreComments(args[0]); } new CommentTracker().replaceAndRestoreComments(printCall.getArgumentList(), stringFormat.getArgumentList()); } else { final CommentTracker ct = new CommentTracker(); final PsiExpression[] args = stringFormat.getArgumentList().getExpressions(); final PsiExpression element = PsiUtil.skipParenthesizedExprDown(args[args.length - 1]); if (element == null) return; ct.replaceAndRestoreComments(stringFormat, element); } }