Track lookups in JavaSyntheticPropertiesScope

This commit is contained in:
Zalim Bashorov
2015-10-23 17:53:54 +03:00
parent 412e078a6b
commit a5708c9c0d
15 changed files with 185 additions and 60 deletions
@@ -25,6 +25,7 @@ import com.intellij.util.Processor
import org.jetbrains.kotlin.asJava.namedUnwrappedElement
import org.jetbrains.kotlin.idea.caches.resolve.getJavaMethodDescriptor
import org.jetbrains.kotlin.idea.search.restrictToKotlinSources
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.psi.KtProperty
import org.jetbrains.kotlin.storage.LockBasedStorageManager
import org.jetbrains.kotlin.synthetic.JavaSyntheticPropertiesScope
@@ -52,7 +53,7 @@ public class KotlinPropertyAccessorsReferenceSearcher() : QueryExecutorBase<PsiR
}
val functionDescriptor = method.getJavaMethodDescriptor() ?: return null
val syntheticExtensionsScope = JavaSyntheticPropertiesScope(LockBasedStorageManager())
val syntheticExtensionsScope = JavaSyntheticPropertiesScope(LockBasedStorageManager(), LookupTracker.DO_NOTHING)
val property = SyntheticJavaPropertyDescriptor.findByGetterOrSetter(functionDescriptor, syntheticExtensionsScope) ?: return null
return property.getName().asString()
}