Check the backing field before checking accessors in KotlinAnnotatedElementsSearcher. This should be faster, and it fixes the problem with IDEA hangs in DataBinding.
This commit is contained in:
committed by
Yan Zhulanow
parent
e775cc697e
commit
433dfdd1e8
+5
-2
@@ -55,9 +55,12 @@ class KotlinAnnotatedElementsSearcher : QueryExecutor<PsiModifierListOwner, Anno
|
||||
consumer.process(wrappedMethod)
|
||||
}
|
||||
is KtProperty -> {
|
||||
with (LightClassUtil.getLightClassPropertyMethods(declaration)) {
|
||||
if (backingField != null) consumer.process(backingField) else all { consumer.process(it) }
|
||||
val backingField = LightClassUtil.getLightClassBackingField(declaration)
|
||||
if (backingField != null) {
|
||||
return@processAnnotatedMembers consumer.process(backingField)
|
||||
}
|
||||
|
||||
LightClassUtil.getLightClassPropertyMethods(declaration).all { consumer.process(it) }
|
||||
}
|
||||
else -> true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user