aboutsummaryrefslogtreecommitdiff
path: root/src/Formats
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-24 16:24:00 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-24 16:24:00 +0100
commita60d8ba79fd823260582b558f9f61229b12f4f6e (patch)
treeb5e3dbeb7ed7271dfdfd35a01cde61db676c5dc9 /src/Formats
parentb1296e64749b9d7250fe0284f0322ea7713c879a (diff)
downloaddokka-a60d8ba79fd823260582b558f9f61229b12f4f6e.tar.gz
dokka-a60d8ba79fd823260582b558f9f61229b12f4f6e.tar.bz2
dokka-a60d8ba79fd823260582b558f9f61229b12f4f6e.zip
understand @deprecated tag in javadoc
Diffstat (limited to 'src/Formats')
-rw-r--r--src/Formats/StructuredFormatService.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index d2e2436b..efddd578 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -98,7 +98,7 @@ public abstract class StructuredFormatService(locationService: LocationService,
to.append(formatCode(formatText(location, languageService.render(it))))
it.appendSourceLink(to)
it.appendOverrides(to)
- it.appendDeprecation(to)
+ it.appendDeprecation(location, to)
}
// All items have exactly the same documentation, so we can use any item to render it
val item = items.first()
@@ -149,13 +149,16 @@ public abstract class StructuredFormatService(locationService: LocationService,
}
}
- private fun DocumentationNode.appendDeprecation(to: StringBuilder) {
+ private fun DocumentationNode.appendDeprecation(location: Location, to: StringBuilder) {
if (deprecation != null) {
val deprecationParameter = deprecation!!.details(DocumentationNode.Kind.Parameter).firstOrNull()
val deprecationValue = deprecationParameter?.details(DocumentationNode.Kind.Value)?.firstOrNull()
if (deprecationValue != null) {
to.append(formatStrong("Deprecated: "))
appendLine(to, formatText(deprecationValue.name.trim("\"")))
+ } else if (deprecation?.content != Content.Empty) {
+ to.append(formatStrong("Deprecated: "))
+ to.append(formatText(location, deprecation!!.content))
} else {
appendLine(to, formatStrong("Deprecated"))
}