void (@NotNull PsiDocComment comment, @NotNull Editor editor, @NotNull PsiFile file) { Document document = editor.getDocument(); int lineToNavigate = -1; for (PsiDocTag tag : comment.getTags()) { PsiElement nameElement = tag.getNameElement(); if (nameElement == null || !CARET_ANCHOR_TAGS.contains(nameElement.getText())) { continue; } boolean good = false; PsiElement[] dataElements = tag.getDataElements(); PsiDocTagValue valueElement = tag.getValueElement(); for (PsiElement element : dataElements) { if (element == valueElement) { continue; } if (!StringUtil.isEmptyOrSpaces(element.getText())) { good = true; break; } } if (!good) { int offset = tag.getTextRange().getEndOffset(); CharSequence text = document.getCharsSequence(); int i = CharArrayUtil.shiftBackward(text, offset - 1, " \t*"); if (i > 0 && text.charAt(i) == '\n') { offset = i - 1; } lineToNavigate = document.getLineNumber(offset); break; } } if (lineToNavigate >= 0) { editor.getCaretModel().moveToOffset(document.getLineEndOffset(lineToNavigate)); JavadocNavigationDelegate.navigateToLineEnd(editor, file); } }