void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { final PsiElementFactory factory = JavaPsiFacade.getElementFactory(project); final PsiIdentifier identifier = factory.createIdentifier(myReplacementName); final JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(project); styleManager.shortenClassReferences(element.replace(identifier)); }