aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Java
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-12 16:14:21 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-12 16:14:21 +0100
commita3ec2e2afd6f4140ac78f7630fa9c2ca1f8ca8af (patch)
treec0a87789124c2fff312c5b32f1a4e6815129abca /core/src/main/kotlin/Java
parent99b6196bde4773fd26bd733ecf5e3984ce0a4c63 (diff)
downloaddokka-a3ec2e2afd6f4140ac78f7630fa9c2ca1f8ca8af.tar.gz
dokka-a3ec2e2afd6f4140ac78f7630fa9c2ca1f8ca8af.tar.bz2
dokka-a3ec2e2afd6f4140ac78f7630fa9c2ca1f8ca8af.zip
generate signature-based anchors for overloads; use signature instead of name as an anchor for in-page links
Diffstat (limited to 'core/src/main/kotlin/Java')
-rw-r--r--core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
index 67bf1f08..9d75792c 100644
--- a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
+++ b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
@@ -6,15 +6,15 @@ import com.intellij.psi.util.InheritanceUtil
fun getSignature(element: PsiElement?) = when(element) {
is PsiClass -> element.qualifiedName
- is PsiField -> element.containingClass!!.qualifiedName + "#" + element.name
+ is PsiField -> element.containingClass!!.qualifiedName + "$" + element.name
is PsiMethod ->
- element.containingClass!!.qualifiedName + "#" + element.name + "(" +
+ element.containingClass!!.qualifiedName + "$" + element.name + "(" +
element.parameterList.parameters.map { it.type.typeSignature() }.joinToString(",") + ")"
else -> null
}
private fun PsiType.typeSignature(): String = when(this) {
- is PsiArrayType -> "Array<${componentType.typeSignature()}>"
+ is PsiArrayType -> "Array((${componentType.typeSignature()}))"
else -> mapTypeName(this)
}