aboutsummaryrefslogtreecommitdiff
path: root/src/Java/JavaDocumentationBuilder.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/JavaDocumentationBuilder.kt')
-rw-r--r--src/Java/JavaDocumentationBuilder.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index 660ffafb..c76c4c33 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -31,11 +31,11 @@ public class JavaDocumentationBuilder() {
val text = if (result.isEmpty()) it.getText().trimLeading() else it.getText()
result.append(ContentText(text))
}
- docComment.getTags().forEach {
- val subjectName = it.getSubjectName()
- val section = result.addSection(javadocSectionDisplayName(it.getName()), subjectName)
- it.getDataElements().forEach {
- if (it !is PsiDocTagValue) {
+ docComment.getTags().forEach { tag ->
+ val subjectName = tag.getSubjectName()
+ val section = result.addSection(javadocSectionDisplayName(tag.getName()), subjectName)
+ tag.getDataElements().forEach {
+ if (it !is PsiDocTagValue || tag.getSubjectName() == null) {
section.append(ContentText(it.getText()))
}
}
@@ -44,7 +44,7 @@ public class JavaDocumentationBuilder() {
}
fun PsiDocTag.getSubjectName(): String? {
- if (getName() == "param") {
+ if (getName() == "param" || getName() == "throws" || getName() == "exception") {
return getValueElement()?.getText()
}
return null