diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-16 12:48:07 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-16 12:48:07 +0100 |
commit | 6c93cc98e52c2096ebd8197a3f2d1201f0a5bedc (patch) | |
tree | 25c8091ea0b5747c3f0d393d6eeffb087d34ca45 | |
parent | 555f9cf07ada20ffc947dd57ebb3cdcb6a020ab4 (diff) | |
download | dokka-6c93cc98e52c2096ebd8197a3f2d1201f0a5bedc.tar.gz dokka-6c93cc98e52c2096ebd8197a3f2d1201f0a5bedc.tar.bz2 dokka-6c93cc98e52c2096ebd8197a3f2d1201f0a5bedc.zip |
represent type arguments as nodes of type Type, not TypeParameter
-rw-r--r-- | src/Java/JavaDocumentationBuilder.kt | 6 | ||||
-rw-r--r-- | test/src/model/JavaTest.kt | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt index c30e6f06..9770fc95 100644 --- a/src/Java/JavaDocumentationBuilder.kt +++ b/src/Java/JavaDocumentationBuilder.kt @@ -145,10 +145,10 @@ public class JavaDocumentationBuilder() { val name = mapTypeName(this) val node = DocumentationNode(name, Content.Empty, kind) if (this is PsiClassType) { - node.appendDetails(getParameters()) { build(Kind.TypeParameter) } + node.appendDetails(getParameters()) { build(Kind.Type) } } - if (this is PsiArrayType) { - node.append(getComponentType().build(Kind.TypeParameter), DocumentationReference.Kind.Detail) + if (this is PsiArrayType && this !is PsiEllipsisType) { + node.append(getComponentType().build(Kind.Type), DocumentationReference.Kind.Detail) } return node } diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index 62728f45..3ff04b14 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -66,11 +66,11 @@ public class JavaTest { with(cls.members.single()) { val type = detail(DocumentationNode.Kind.Type) assertEquals("Array", type.name) - assertEquals("String", type.detail(DocumentationNode.Kind.TypeParameter).name) + assertEquals("String", type.detail(DocumentationNode.Kind.Type).name) with(details(DocumentationNode.Kind.Parameter).single()) { val type = detail(DocumentationNode.Kind.Type) assertEquals("Array", type.name) - assertEquals("Int", type.detail(DocumentationNode.Kind.TypeParameter).name) + assertEquals("Int", type.detail(DocumentationNode.Kind.Type).name) } } } @@ -83,7 +83,7 @@ public class JavaTest { assertEquals("T", name) with(detail(DocumentationNode.Kind.UpperBound)) { assertEquals("Comparable", name) - assertEquals("T", detail(DocumentationNode.Kind.TypeParameter).name) + assertEquals("T", detail(DocumentationNode.Kind.Type).name) } } with(cls.members.single()) { @@ -119,6 +119,7 @@ public class JavaTest { assertEquals("vararg", param.annotations.first().name) val psiType = param.detail(DocumentationNode.Kind.Type) assertEquals("String", psiType.name) + assertTrue(psiType.details(DocumentationNode.Kind.Type).isEmpty()) } } } |