mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Groovy: minimal working implementation of findAttributeValue for GrUAnnotation
Required for IDEA-257331 GitOrigin-RevId: 422601d2ce5fea22de8c67a2878f8535abb1945b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c5daf867c4
commit
8f71bdc342
+6
-3
@@ -118,14 +118,17 @@ class GrUAnnotation(val grElement: GrAnnotation,
|
||||
}
|
||||
}
|
||||
|
||||
override fun findAttributeValue(name: String?): UExpression? = null //not implemented
|
||||
override fun findAttributeValue(name: String?): UExpression? = findDeclaredAttributeValue(name)
|
||||
|
||||
override fun findDeclaredAttributeValue(name: String?): UExpression? = null //not implemented
|
||||
override fun findDeclaredAttributeValue(name: String?): UExpression? {
|
||||
return grElement.parameterList.attributes.asSequence()
|
||||
.find { it.name == name || it.name == null && "value" == name }
|
||||
?.let { GrUNamedExpression(it) { this } }
|
||||
}
|
||||
|
||||
override val uastParent: UElement? by lazy(parentProvider)
|
||||
|
||||
override val psi: PsiElement? = grElement
|
||||
|
||||
}
|
||||
|
||||
class GrUnknownUExpression(override val psi: PsiElement?, override val uastParent: UElement?) : UExpression {
|
||||
|
||||
Reference in New Issue
Block a user