void (PsiExpression expression, String methodName) { CommentTracker tracker = new CommentTracker(); String text = JAVA_UTIL_COLLECTIONS + '.' + methodName + '(' + tracker.text(expression) + ')'; PsiElement result = tracker.replaceAndRestoreComments(expression, text); JavaCodeStyleManager.getInstance(result.getProject()).shortenClassReferences(result); }