void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { final PsiModifierListOwner modifierListOwner = PsiTreeUtil.getParentOfType(element, PsiModifierListOwner.class); if (modifierListOwner == null) { return; } final PsiModifierList modifiers = modifierListOwner.getModifierList(); if (modifiers == null) { return; } modifiers.setModifierProperty(modifierText, true); }