void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!(element instanceof PsiLambdaExpression)) return; PsiElement result = new CommentTracker().replaceAndRestoreComments(element, myReplacement); CodeStyleManager.getInstance(project).reformat(JavaCodeStyleManager.getInstance(project).shortenClassReferences(result)); }