void (@NotNull Project project, @NotNull PsiElement startElement, @NotNull ModPsiUpdater updater) { PsiExpression newExp = JavaPsiFacade.getInstance(project).getElementFactory().createExpressionFromText(myText, startElement); PsiElement element = startElement.replace(newExp); JavaCodeStyleManager.getInstance(project).shortenClassReferences(element); }