Analysis API: add KDoc, small cosmetic improvements
This commit is contained in:
+2
-2
@@ -45,7 +45,7 @@ private class FirNameValuePairForAnnotationArgument(
|
||||
override fun setValue(p0: PsiAnnotationMemberValue) = cannotModify()
|
||||
|
||||
private val _nameIdentifier: PsiIdentifier by lazyPub {
|
||||
LightIdentifier(parent.manager, constantValue.name)
|
||||
LightIdentifier(parent.manager, constantValue.name.asString())
|
||||
}
|
||||
|
||||
override fun getNameIdentifier(): PsiIdentifier = _nameIdentifier
|
||||
@@ -54,5 +54,5 @@ private class FirNameValuePairForAnnotationArgument(
|
||||
|
||||
override fun getLiteralValue(): String? = (value as? PsiLiteralExpression)?.value?.toString()
|
||||
|
||||
override fun getName(): String = constantValue.name
|
||||
override fun getName(): String = constantValue.name.asString()
|
||||
}
|
||||
|
||||
+4
-4
@@ -202,13 +202,13 @@ internal fun KtAnnotationValue.toAnnotationMemberValue(parent: PsiElement): PsiA
|
||||
FirPsiExpression(sourcePsi, parent, psiExpression)
|
||||
}
|
||||
KtUnsupportedAnnotationValue -> null
|
||||
is KtErrorClassAnnotationValue -> null
|
||||
is KtLocalKClassAnnotationValue -> null
|
||||
is KtNonLocalKClassAnnotationValue -> toAnnotationMemberValue(parent)
|
||||
is KtKClassAnnotationValue.KtErrorClassAnnotationValue -> null
|
||||
is KtKClassAnnotationValue.KtLocalKClassAnnotationValue -> null
|
||||
is KtKClassAnnotationValue.KtNonLocalKClassAnnotationValue -> toAnnotationMemberValue(parent)
|
||||
}
|
||||
}
|
||||
|
||||
private fun KtNonLocalKClassAnnotationValue.toAnnotationMemberValue(parent: PsiElement): PsiExpression? {
|
||||
private fun KtKClassAnnotationValue.KtNonLocalKClassAnnotationValue.toAnnotationMemberValue(parent: PsiElement): PsiExpression? {
|
||||
val fqName = classId.asSingleFqName()
|
||||
val canonicalText = psiType(
|
||||
fqName.asString(), parent, boxPrimitiveType = false /* TODO value.arrayNestedness > 0*/,
|
||||
|
||||
Reference in New Issue
Block a user