ModCommand (List<PsiModifierListOwner> listOwner, @NotNull List<String> annotationFQNs) { return processExistingExternalAnnotationsModCommand(listOwner, annotationFQNs, annotationTag -> { PsiElement parent = annotationTag.getParent(); annotationTag.delete(); if (parent instanceof XmlTag xmlTag) { if (xmlTag.getSubTags().length == 0) { parent.delete(); } } return true; }); }