Remove some usages of JetElement.analyzeAndGetResult
This commit is contained in:
@@ -43,7 +43,7 @@ import com.sun.jdi.request.MethodEntryRequest
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeAndGetResult
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.util.application.runReadAction
|
||||
import org.jetbrains.kotlin.load.java.JvmAbi
|
||||
import org.jetbrains.kotlin.load.kotlin.PackageClassUtils
|
||||
@@ -189,7 +189,7 @@ class KotlinFieldBreakpoint(
|
||||
|
||||
private fun computeBreakpointType(property: JetCallableDeclaration): BreakpointType {
|
||||
return runReadAction {
|
||||
val bindingContext = property.analyzeAndGetResult().bindingContext
|
||||
val bindingContext = property.analyze()
|
||||
var descriptor = bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, property)
|
||||
if (descriptor is ValueParameterDescriptor) {
|
||||
descriptor = bindingContext.get(BindingContext.VALUE_PARAMETER_AS_PROPERTY, descriptor)
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor
|
||||
import org.jetbrains.kotlin.idea.JetBundle
|
||||
import org.jetbrains.kotlin.idea.JetFileType
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeAndGetResult
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.debugger.breakpoints.dialog.AddFieldBreakpointDialog
|
||||
import org.jetbrains.kotlin.idea.util.application.runWriteAction
|
||||
import org.jetbrains.kotlin.psi.*
|
||||
@@ -83,7 +83,7 @@ public class KotlinFieldBreakpointType : JavaBreakpointType<KotlinPropertyBreakp
|
||||
}
|
||||
|
||||
if (element is JetProperty || element is JetParameter) {
|
||||
val bindingContext = (element as JetElement).analyzeAndGetResult().bindingContext
|
||||
val bindingContext = (element as JetElement).analyze()
|
||||
var descriptor = bindingContext.get(BindingContext.DECLARATION_TO_DESCRIPTOR, element)
|
||||
if (descriptor is ValueParameterDescriptor) {
|
||||
descriptor = bindingContext.get(BindingContext.VALUE_PARAMETER_AS_PROPERTY, descriptor)
|
||||
|
||||
@@ -25,13 +25,10 @@ import com.intellij.psi.PsiDocumentManager
|
||||
import com.intellij.psi.PsiMethod
|
||||
import com.intellij.util.Range
|
||||
import com.intellij.util.containers.OrderedSet
|
||||
import org.jetbrains.kotlin.asJava.LightClassUtil
|
||||
import org.jetbrains.kotlin.codegen.intrinsics.IntrinsicMethod
|
||||
import org.jetbrains.kotlin.codegen.intrinsics.IntrinsicMethods
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeAndGetResult
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeFully
|
||||
import org.jetbrains.kotlin.idea.codeInsight.CodeInsightUtils
|
||||
import org.jetbrains.kotlin.idea.codeInsight.DescriptorToSourceUtilsIde
|
||||
@@ -69,7 +66,7 @@ public class KotlinSmartStepIntoHandler : JvmSmartStepIntoHandler() {
|
||||
element.accept(object: JetTreeVisitorVoid() {
|
||||
|
||||
override fun visitFunctionLiteralExpression(expression: JetFunctionLiteralExpression) {
|
||||
val context = expression.analyzeAndGetResult().bindingContext
|
||||
val context = expression.analyze()
|
||||
val resolvedCall = expression.getParentCall(context).getResolvedCall(context)
|
||||
if (resolvedCall != null && !InlineUtil.isInline(resolvedCall.getResultingDescriptor())) {
|
||||
val arguments = resolvedCall.getValueArguments()
|
||||
|
||||
Reference in New Issue
Block a user