diff options
author | KrystianUjma <kujma@virtuslab.com> | 2019-05-28 11:51:33 +0200 |
---|---|---|
committer | KrystianUjma <kujma@virtuslab.com> | 2019-05-28 11:51:33 +0200 |
commit | 218e7b9bd9b40c7216755f20f5a604b4c37b75d7 (patch) | |
tree | 555a4d92f02c95d8c59177645b157b80433d5a47 /core/src/main/kotlin/Kotlin | |
parent | 6dedccb91b4bb3018b32159551b3862fedb7f230 (diff) | |
parent | ec2dfa898b4cf2613ca15cd959a43f4f590005d3 (diff) | |
download | dokka-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/Kotlin')
4 files changed, 6 insertions, 7 deletions
diff --git a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt index 32084eea..88494581 100644 --- a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt +++ b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt @@ -34,7 +34,7 @@ class DeclarationLinkResolver val signature = elementSignatureProvider.signature(symbol) val referencedAt = fromDescriptor.signatureWithSourceLocation() - return ContentNodeLazyLink(href) { -> + return ContentNodeLazyLink(href) { val target = refGraph.lookup(signature) if (target == null) { diff --git a/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt b/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt index ddd8a32a..ce20aeec 100644 --- a/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt +++ b/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt @@ -74,7 +74,7 @@ class DescriptorDocumentationParser } val tree = parseMarkdown(kdocText) val linkMap = LinkMap.buildLinkMap(tree.node, kdocText) - val content = buildContent(tree, LinkResolver(linkMap, { href -> linkResolver.resolveContentLink(contextDescriptor, href) }), inline) + val content = buildContent(tree, LinkResolver(linkMap) { href -> linkResolver.resolveContentLink(contextDescriptor, href) }, inline) if (kdoc is KDocSection) { val tags = kdoc.getTags() tags.forEach { @@ -87,7 +87,7 @@ class DescriptorDocumentationParser val section = content.addSection(javadocSectionDisplayName(it.name), it.getSubjectName()) val sectionContent = it.getContent() val markdownNode = parseMarkdown(sectionContent) - buildInlineContentTo(markdownNode, section, LinkResolver(linkMap, { href -> linkResolver.resolveContentLink(contextDescriptor, href) })) + buildInlineContentTo(markdownNode, section, LinkResolver(linkMap) { href -> linkResolver.resolveContentLink(contextDescriptor, href) }) } } } @@ -129,7 +129,7 @@ class DescriptorDocumentationParser FqName.fromSegments(listOf("kotlin", "Any")), NoLookupLocation.FROM_IDE) anyClassDescriptors.forEach { val anyMethod = (it as ClassDescriptor).getMemberScope(listOf()) - .getDescriptorsFiltered(DescriptorKindFilter.FUNCTIONS, { it == descriptor.name }) + .getDescriptorsFiltered(DescriptorKindFilter.FUNCTIONS) { it == descriptor.name } .single() val kdoc = anyMethod.findKDoc() if (kdoc != null) { diff --git a/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt index 6e58f766..ee9d8c51 100644 --- a/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt @@ -42,8 +42,7 @@ class KotlinAsJavaDocumentationBuilder fun PsiClass.isVisibleInDocumentation(): Boolean { val origin: KtDeclaration = (this as KtLightElement<*, *>).kotlinOrigin as? KtDeclaration ?: return true - return origin.hasModifier(KtTokens.INTERNAL_KEYWORD) != true && - origin.hasModifier(KtTokens.PRIVATE_KEYWORD) != true + return !origin.hasModifier(KtTokens.INTERNAL_KEYWORD) && !origin.hasModifier(KtTokens.PRIVATE_KEYWORD) } } diff --git a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt index daa09cbf..7310610f 100644 --- a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt +++ b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt @@ -62,7 +62,7 @@ class KotlinLanguageService : CommonLanguageService() { } private fun List<DocumentationNode>.getReceiverKind(): ReceiverKind? { - val qNames = map { it.getReceiverQName() }.filterNotNull() + val qNames = mapNotNull { it.getReceiverQName() } if (qNames.size != size) return null |