aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2019-10-04 00:05:56 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2019-10-04 00:05:56 +0300
commitde2f32d91fb6f564826ddd7644940452356e2080 (patch)
tree0add9a228d498e19279500c37a20c62ef224cec2 /core/src
parent06fb0d88cd096ce287cc63fd37035ad77e2b58e2 (diff)
parenta28db3c1a618ce4b413c7315e8b0a9f43b6ade4a (diff)
downloaddokka-de2f32d91fb6f564826ddd7644940452356e2080.tar.gz
dokka-de2f32d91fb6f564826ddd7644940452356e2080.tar.bz2
dokka-de2f32d91fb6f564826ddd7644940452356e2080.zip
Merge remote-tracking branch 'origin/multiplatform-support' into tmp--release--0.10.0
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt11
-rw-r--r--core/src/main/kotlin/Generation/DocumentationMerger.kt8
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt2
-rw-r--r--core/src/test/kotlin/model/PackageTest.kt10
4 files changed, 14 insertions, 17 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 7299670e..76f9366f 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -900,18 +900,17 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
val platforms = effectivePlatformsForNode(type)
appendIndexRow(platforms) {
appendPlatforms(platforms)
- appendHeader(level = 5) {
- appendLink(link(node, type) {
- if (it.kind == NodeKind.ExternalClass) it.name else it.qualifiedName()
- })
- }
-
if (type.kind == NodeKind.ExternalClass) {
val packageName = type.owner?.name
if (packageName != null) {
appendText(" (extensions in package $packageName)")
}
}
+ appendHeader(level = 5) {
+ appendLink(link(node, type) {
+ if (it.kind == NodeKind.ExternalClass) it.name else it.qualifiedName()
+ })
+ }
appendContent(type.summary)
}
diff --git a/core/src/main/kotlin/Generation/DocumentationMerger.kt b/core/src/main/kotlin/Generation/DocumentationMerger.kt
index 5d53868a..53dc23a9 100644
--- a/core/src/main/kotlin/Generation/DocumentationMerger.kt
+++ b/core/src/main/kotlin/Generation/DocumentationMerger.kt
@@ -164,7 +164,13 @@ class DocumentationMerger(
if (groupNode.kind == NodeKind.ExternalClass){
val refs = nodes.flatMap { it.allReferences() }.filter { it.kind != RefKind.Owner && it.kind != RefKind.TopLevelPage }
- refs.forEach { it.to.append(groupNode, RefKind.TopLevelPage); groupNode.append(it.to, RefKind.Member) }
+ refs.forEach {
+ if (it.kind != RefKind.Link) {
+ it.to.dropReferences { ref -> ref.kind == RefKind.Owner }
+ it.to.append(groupNode, RefKind.Owner)
+ }
+ groupNode.append(it.to, it.kind)
+ }
}
// if nodes are classes, nested members should be also merged and
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index eb0399c7..3168e033 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -423,7 +423,7 @@ class DocumentationBuilder
fun DocumentationModule.appendFragments(fragments: Collection<PackageFragmentDescriptor>,
packageContent: Map<String, Content>,
packageDocumentationBuilder: PackageDocumentationBuilder) {
- val allFqNames = fragments.map { it.fqName }.distinct()
+ val allFqNames = fragments.filter{ it.isDocumented(passConfiguration) }.map { it.fqName }.distinct()
for (packageName in allFqNames) {
if (packageName.isRoot && !passConfiguration.includeRootPackage) continue
diff --git a/core/src/test/kotlin/model/PackageTest.kt b/core/src/test/kotlin/model/PackageTest.kt
index e20e6afa..47c88385 100644
--- a/core/src/test/kotlin/model/PackageTest.kt
+++ b/core/src/test/kotlin/model/PackageTest.kt
@@ -126,15 +126,7 @@ abstract class BasePackageTest(val analysisPlatform: Platform) {
analysisPlatform = analysisPlatform
)
) { model ->
- assertEquals(1, model.members.count())
- with(model.members.elementAt(0)) {
- assertEquals(NodeKind.Package, kind)
- assertEquals("simple.name", name)
- assertEquals(Content.Empty, content)
- assertTrue(details.none())
- assertTrue(members.none())
- assertTrue(links.none())
- }
+ assertEquals(0, model.members.count())
}
}
}