diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-24 16:24:00 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-24 16:24:00 +0100 |
commit | a60d8ba79fd823260582b558f9f61229b12f4f6e (patch) | |
tree | b5e3dbeb7ed7271dfdfd35a01cde61db676c5dc9 /src/Formats | |
parent | b1296e64749b9d7250fe0284f0322ea7713c879a (diff) | |
download | dokka-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.kt | 7 |
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")) } |