Be able to find annotated property accessor
#KT-37494 Fixed
This commit is contained in:
+4
@@ -65,6 +65,10 @@ class KotlinAnnotatedElementsSearcher : QueryExecutor<PsiModifierListOwner, Anno
|
||||
|
||||
LightClassUtil.getLightClassPropertyMethods(declaration).all { consumer.process(it) }
|
||||
}
|
||||
is KtPropertyAccessor -> {
|
||||
val method = LightClassUtil.getLightClassAccessorMethod(declaration)
|
||||
return@processAnnotatedMembers consumer.process(method)
|
||||
}
|
||||
is KtParameter -> {
|
||||
if (!declaration.toPsiParameters().all { consumer.process(it) }) return@processAnnotatedMembers false
|
||||
LightClassUtil.getLightClassBackingField(declaration)?.let {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
var name: String = ""
|
||||
@java.lang.Deprecated
|
||||
get() { TODO() }
|
||||
set(value) { TODO() }
|
||||
|
||||
// ANNOTATION: java.lang.Deprecated
|
||||
// SEARCH: method:getName
|
||||
+5
@@ -58,6 +58,11 @@ public class AnnotatedMembersSearchTestGenerated extends AbstractAnnotatedMember
|
||||
runTest("idea/testData/search/annotations/testAnnotationsOnPropertiesAndParameters.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("testAnnotationsOnPropertyAccessor.kt")
|
||||
public void testTestAnnotationsOnPropertyAccessor() throws Exception {
|
||||
runTest("idea/testData/search/annotations/testAnnotationsOnPropertyAccessor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("testAnnotationsWithParameters.kt")
|
||||
public void testTestAnnotationsWithParameters() throws Exception {
|
||||
runTest("idea/testData/search/annotations/testAnnotationsWithParameters.kt");
|
||||
|
||||
Reference in New Issue
Block a user