diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-05 17:48:39 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-03-05 17:48:39 +0100 |
commit | 0cab60b604cd7f0f642ab389973bfce1bbbe6071 (patch) | |
tree | 36de0794915150846458e9937bc54a710accbb35 /src/Kotlin | |
parent | e97dba639279678381168c252dd72a06afa23c31 (diff) | |
download | dokka-0cab60b604cd7f0f642ab389973bfce1bbbe6071.tar.gz dokka-0cab60b604cd7f0f642ab389973bfce1bbbe6071.tar.bz2 dokka-0cab60b604cd7f0f642ab389973bfce1bbbe6071.zip |
update dokka and intellij-markdown to latest Kotlin changes
Diffstat (limited to 'src/Kotlin')
-rw-r--r-- | src/Kotlin/DocumentationBuilder.kt | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt index 5ceb7f3d..9ca3ad79 100644 --- a/src/Kotlin/DocumentationBuilder.kt +++ b/src/Kotlin/DocumentationBuilder.kt @@ -389,7 +389,6 @@ class DocumentationBuilder(val session: ResolveSession, fun ClassDescriptor.build(): DocumentationNode { val kind = when (getKind()) { ClassKind.OBJECT -> Kind.Object - ClassKind.CLASS_OBJECT -> Kind.Object ClassKind.TRAIT -> Kind.Interface ClassKind.ENUM_CLASS -> Kind.Enum ClassKind.ANNOTATION_CLASS -> Kind.AnnotationClass @@ -411,9 +410,9 @@ class DocumentationBuilder(val session: ResolveSession, } val members = getDefaultType().getMemberScope().getAllDescriptors().filter { it != getDefaultObjectDescriptor() } node.appendChildren(members, DocumentationReference.Kind.Member) - val classObjectDescriptor = getDefaultObjectDescriptor() - if (classObjectDescriptor != null) { - node.appendChildren(classObjectDescriptor.getDefaultType().getMemberScope().getAllDescriptors(), + val defaultObjectDescriptor = getDefaultObjectDescriptor() + if (defaultObjectDescriptor != null) { + node.appendChildren(defaultObjectDescriptor.getDefaultType().getMemberScope().getAllDescriptors(), DocumentationReference.Kind.Member) } node.appendAnnotations(this) @@ -429,8 +428,8 @@ class DocumentationBuilder(val session: ResolveSession, return node } - private fun DeclarationDescriptor.inClassObject() = - getContainingDeclaration().let { it is ClassDescriptor && it.getKind() == ClassKind.CLASS_OBJECT } + private fun DeclarationDescriptor.inDefaultObject() = + getContainingDeclaration().let { it is ClassDescriptor && it.isDefaultObject() } fun CallableMemberDescriptor.getExtensionClassDescriptor(): ClassifierDescriptor? { val extensionReceiver = getExtensionReceiverParameter() @@ -442,7 +441,7 @@ class DocumentationBuilder(val session: ResolveSession, } fun FunctionDescriptor.build(): DocumentationNode { - val node = DocumentationNode(this, if (inClassObject()) Kind.DefaultObjectFunction else Kind.Function) + val node = DocumentationNode(this, if (inDefaultObject()) Kind.DefaultObjectFunction else Kind.Function) node.appendInPageChildren(getTypeParameters(), DocumentationReference.Kind.Detail) getExtensionReceiverParameter()?.let { node.appendChild(it, DocumentationReference.Kind.Detail) } @@ -524,7 +523,7 @@ class DocumentationBuilder(val session: ResolveSession, } fun PropertyDescriptor.build(): DocumentationNode { - val node = DocumentationNode(this, if (inClassObject()) Kind.DefaultObjectProperty else Kind.Property) + val node = DocumentationNode(this, if (inDefaultObject()) Kind.DefaultObjectProperty else Kind.Property) node.appendInPageChildren(getTypeParameters(), DocumentationReference.Kind.Detail) getExtensionReceiverParameter()?.let { node.appendChild(it, DocumentationReference.Kind.Detail) } node.appendType(getReturnType()) |