void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { if (!(element instanceof PsiModifierList)) { element = element.getParent(); if (!(element instanceof PsiModifierList)) return; } final PsiModifierList modifierList = (PsiModifierList)element; @NonNls final String text = String.join(" ", getSortedModifiers(modifierList)); PsiModifierList newModifierList = createNewModifierList(modifierList, text); if (newModifierList != null) { new CommentTracker().replaceAndRestoreComments(modifierList, newModifierList); } }