void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { PsiDocComment docComment = PsiTreeUtil.getParentOfType(element, PsiDocComment.class); if (docComment != null) { PsiDocTag tag = JavaPsiFacade.getElementFactory(project).createDocTagFromText("@" + myTag + " " + myValue); PsiElement addedTag; PsiElement anchor = getAnchor(element); if (anchor != null) { addedTag = docComment.addBefore(tag, anchor); } else { addedTag = docComment.add(tag); } PsiElement sibling = addedTag.getNextSibling(); if (sibling != null) { updater.moveTo(sibling); } } }