aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Model
diff options
context:
space:
mode:
authorKrystianUjma <kujma@virtuslab.com>2019-05-28 11:51:33 +0200
committerKrystianUjma <kujma@virtuslab.com>2019-05-28 11:51:33 +0200
commit218e7b9bd9b40c7216755f20f5a604b4c37b75d7 (patch)
tree555a4d92f02c95d8c59177645b157b80433d5a47 /core/src/main/kotlin/Model
parent6dedccb91b4bb3018b32159551b3862fedb7f230 (diff)
parentec2dfa898b4cf2613ca15cd959a43f4f590005d3 (diff)
downloaddokka-218e7b9bd9b40c7216755f20f5a604b4c37b75d7.tar.gz
dokka-218e7b9bd9b40c7216755f20f5a604b4c37b75d7.tar.bz2
dokka-218e7b9bd9b40c7216755f20f5a604b4c37b75d7.zip
Merge branch 'dev' of git://github.com/Xerus2000/dokka into Xerus2000-dev
update .gitignore and .idea # Conflicts: # .idea/compiler.xml # .idea/kotlinc.xml # .idea/modules.xml # core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt # core/src/main/kotlin/Java/JavadocParser.kt # core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt # core/src/main/kotlin/Kotlin/DocumentationBuilder.kt # core/src/main/kotlin/Model/DocumentationReference.kt # core/src/main/kotlin/Model/PackageDocs.kt # core/src/main/kotlin/Model/SourceLinks.kt # core/src/main/kotlin/Utilities/DokkaModules.kt # core/src/main/kotlin/Utilities/ServiceLocator.kt # core/src/main/kotlin/javadoc/docbase.kt # core/src/test/kotlin/format/HtmlFormatTest.kt # core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt # core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt # core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt # core/src/test/kotlin/issues/IssuesTest.kt
Diffstat (limited to 'core/src/main/kotlin/Model')
-rw-r--r--core/src/main/kotlin/Model/Content.kt8
-rw-r--r--core/src/main/kotlin/Model/DocumentationNode.kt8
-rw-r--r--core/src/main/kotlin/Model/PackageDocs.kt4
3 files changed, 10 insertions, 10 deletions
diff --git a/core/src/main/kotlin/Model/Content.kt b/core/src/main/kotlin/Model/Content.kt
index 8312b2e2..5530e1b4 100644
--- a/core/src/main/kotlin/Model/Content.kt
+++ b/core/src/main/kotlin/Model/Content.kt
@@ -171,10 +171,10 @@ class ContentSection(val tag: String, val subjectName: String?) : ContentBlock()
}
object ContentTags {
- val Description = "Description"
- val SeeAlso = "See Also"
- val Return = "Return"
- val Exceptions = "Exceptions"
+ const val Description = "Description"
+ const val SeeAlso = "See Also"
+ const val Return = "Return"
+ const val Exceptions = "Exceptions"
}
fun content(body: ContentBlock.() -> Unit): ContentBlock {
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt
index 1ff14ff1..311b46e4 100644
--- a/core/src/main/kotlin/Model/DocumentationNode.kt
+++ b/core/src/main/kotlin/Model/DocumentationNode.kt
@@ -177,10 +177,10 @@ open class DocumentationNode(val name: String,
fun inheritedCompanionObjectMembers(kind: NodeKind): List<DocumentationNode> = inheritedCompanionObjectMembers.filter { it.kind == kind }
fun links(kind: NodeKind): List<DocumentationNode> = links.filter { it.kind == kind }
- fun detail(kind: NodeKind): DocumentationNode = details.filter { it.kind == kind }.single()
- fun detailOrNull(kind: NodeKind): DocumentationNode? = details.filter { it.kind == kind }.singleOrNull()
- fun member(kind: NodeKind): DocumentationNode = members.filter { it.kind == kind }.single()
- fun link(kind: NodeKind): DocumentationNode = links.filter { it.kind == kind }.single()
+ fun detail(kind: NodeKind): DocumentationNode = details.single { it.kind == kind }
+ fun detailOrNull(kind: NodeKind): DocumentationNode? = details.singleOrNull { it.kind == kind }
+ fun member(kind: NodeKind): DocumentationNode = members.single { it.kind == kind }
+ fun link(kind: NodeKind): DocumentationNode = links.single { it.kind == kind }
fun references(kind: RefKind): List<DocumentationReference> = references.filter { it.kind == kind }
diff --git a/core/src/main/kotlin/Model/PackageDocs.kt b/core/src/main/kotlin/Model/PackageDocs.kt
index 5b628914..cf6cd808 100644
--- a/core/src/main/kotlin/Model/PackageDocs.kt
+++ b/core/src/main/kotlin/Model/PackageDocs.kt
@@ -41,7 +41,7 @@ class PackageDocs
targetContent = findTargetContent(headingText.trimStart())
}
} else {
- buildContentTo(it, targetContent, LinkResolver(linkMap, { resolveContentLink(fileName, it, linkResolveContext) }))
+ buildContentTo(it, targetContent, LinkResolver(linkMap) { resolveContentLink(fileName, it, linkResolveContext) })
}
}
} else {
@@ -118,7 +118,7 @@ class PackageDocs
}
private fun findOrCreatePackageContent(packageName: String) =
- _packageContent.getOrPut(packageName) { -> MutableContent() }
+ _packageContent.getOrPut(packageName) { MutableContent() }
private fun resolveContentLink(fileName: String, href: String, linkResolveContext: List<PackageFragmentDescriptor>): ContentBlock {
if (linkResolver != null) {