From f47798e7a740839f8a4ccdab9b96582c3a921eaf Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Fri, 13 Jan 2017 19:07:33 +0300 Subject: Updated Kotlin Compiler finally and resolved problems --- core/src/main/kotlin/javadoc/docbase.kt | 12 +++++------- core/src/main/kotlin/javadoc/tags.kt | 6 +++--- core/testdata/format/paramTag.md | 2 +- lib/kotlin-compiler.jar | Bin 22223675 -> 22257475 bytes lib/kotlin-ide-common.jar | Bin 446805 -> 445319 bytes lib/kotlin-script-runtime.jar | Bin 3352 -> 3353 bytes lib/markdown.jar | Bin 377400 -> 379275 bytes 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/src/main/kotlin/javadoc/docbase.kt b/core/src/main/kotlin/javadoc/docbase.kt index 65b28a42..2a14c6ff 100644 --- a/core/src/main/kotlin/javadoc/docbase.kt +++ b/core/src/main/kotlin/javadoc/docbase.kt @@ -121,7 +121,7 @@ class AnnotationDescAdapter(val module: ModuleNodeAdapter, val node: Documentati override fun elementValues(): Array? = emptyArray() // TODO } -class ProgramElementAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : DocumentationNodeAdapter(module, node), ProgramElementDoc { +open class ProgramElementAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : DocumentationNodeAdapter(module, node), ProgramElementDoc { override fun isPublic(): Boolean = true override fun isPackagePrivate(): Boolean = false override fun isStatic(): Boolean = node.hasModifier("static") @@ -305,7 +305,7 @@ private fun DocumentationNode.hasNonEmptyContent() = this.content.summary !is ContentEmpty || this.content.description !is ContentEmpty || this.content.sections.isNotEmpty() -open class ExecutableMemberAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : DocumentationNodeAdapter(module, node), ProgramElementDoc by ProgramElementAdapter(module, node), ExecutableMemberDoc { +open class ExecutableMemberAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : ProgramElementAdapter(module, node), ExecutableMemberDoc { override fun isSynthetic(): Boolean = false override fun isNative(): Boolean = node.annotations.any { it.name == "native" } @@ -355,7 +355,7 @@ class ConstructorAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : E } } -class MethodAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : DocumentationNodeAdapter(module, node), ExecutableMemberDoc by ExecutableMemberAdapter(module, node), MethodDoc { +class MethodAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : ExecutableMemberAdapter(module, node), MethodDoc { override fun overrides(meth: MethodDoc?): Boolean = false // TODO override fun overriddenType(): Type? = node.overrides.firstOrNull()?.owner?.let { owner -> TypeAdapter(module, owner) } @@ -381,7 +381,7 @@ class MethodAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : Docume } } -class FieldAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : DocumentationNodeAdapter(module, node), ProgramElementDoc by ProgramElementAdapter(module, node), FieldDoc { +class FieldAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : ProgramElementAdapter(module, node), FieldDoc { override fun isSynthetic(): Boolean = false override fun constantValueExpression(): String? = node.detailOrNull(NodeKind.Value)?.let { it.name } @@ -393,11 +393,9 @@ class FieldAdapter(module: ModuleNodeAdapter, node: DocumentationNode) : Documen override fun isVolatile(): Boolean = node.hasAnnotation(Volatile::class) } - open class ClassDocumentationNodeAdapter(module: ModuleNodeAdapter, val classNode: DocumentationNode) - : DocumentationNodeAdapter(module, classNode), + : ProgramElementAdapter(module, classNode), Type by TypeAdapter(module, classNode), - ProgramElementDoc by ProgramElementAdapter(module, classNode), ClassDoc { override fun name(): String { diff --git a/core/src/main/kotlin/javadoc/tags.kt b/core/src/main/kotlin/javadoc/tags.kt index 9e023a81..b9ba7382 100644 --- a/core/src/main/kotlin/javadoc/tags.kt +++ b/core/src/main/kotlin/javadoc/tags.kt @@ -69,9 +69,9 @@ class SeeMethodTagAdapter(holder: Doc, val method: MethodAdapter, content: Conte override fun referencedMember(): MemberDoc = method override fun referencedMemberName(): String = method.name() override fun referencedPackage(): PackageDoc? = null - override fun referencedClass(): ClassDoc = method.containingClass() - override fun referencedClassName(): String = method.containingClass().name() - override fun label(): String = "${method.containingClass().name()}.${method.name()}" + override fun referencedClass(): ClassDoc? = method.containingClass() + override fun referencedClassName(): String = method.containingClass()?.name() ?: "" + override fun label(): String = "${method.containingClass()?.name()}.${method.name()}" override fun inlineTags(): Array = emptyArray() // TODO override fun firstSentenceTags(): Array = inlineTags() // TODO diff --git a/core/testdata/format/paramTag.md b/core/testdata/format/paramTag.md index dec4ad9c..d3e948ae 100644 --- a/core/testdata/format/paramTag.md +++ b/core/testdata/format/paramTag.md @@ -9,4 +9,4 @@ `x` - A string `y` - A number with a really long description that spans multiple lines and goes -on and on and is very interesting to read \ No newline at end of file + on and on and is very interesting to read \ No newline at end of file diff --git a/lib/kotlin-compiler.jar b/lib/kotlin-compiler.jar index 36d98dc5..e81a8048 100644 Binary files a/lib/kotlin-compiler.jar and b/lib/kotlin-compiler.jar differ diff --git a/lib/kotlin-ide-common.jar b/lib/kotlin-ide-common.jar index 6aa8b496..c8200fcb 100644 Binary files a/lib/kotlin-ide-common.jar and b/lib/kotlin-ide-common.jar differ diff --git a/lib/kotlin-script-runtime.jar b/lib/kotlin-script-runtime.jar index 8815c5db..96bfa29a 100644 Binary files a/lib/kotlin-script-runtime.jar and b/lib/kotlin-script-runtime.jar differ diff --git a/lib/markdown.jar b/lib/markdown.jar index 09a640ec..eb2c5ab4 100644 Binary files a/lib/markdown.jar and b/lib/markdown.jar differ -- cgit