diff options
-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()) } } } |