Cleanup 192 patchset files (KTI-315)

This commit is contained in:
Yunir Salimzyanov
2020-08-13 19:00:06 +03:00
parent 73aa21aab6
commit 42da9e62db
126 changed files with 0 additions and 11671 deletions
@@ -1,46 +0,0 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.idea.debugger.stepping
import com.intellij.debugger.engine.SuspendContextImpl
import com.intellij.debugger.engine.events.SuspendContextCommandImpl
import com.intellij.debugger.ui.breakpoints.RunToCursorBreakpoint
import com.sun.jdi.Location
import com.sun.jdi.Method
import com.sun.jdi.event.LocatableEvent
import org.jetbrains.kotlin.idea.debugger.safeLocation
object CoroutineBreakpointFacility : AbstractCoroutineBreakpointFacility() {
override fun installCoroutineResumedBreakpoint(context: SuspendContextImpl, location: Location, method: Method): Boolean {
val debugProcess = context.debugProcess
val project = debugProcess.project
val methodLocation = method.location()
val position = debugProcess.positionManager.getSourcePosition(methodLocation) ?: return false
val breakpoint = object : RunToCursorBreakpoint(project, position, false) {
override fun processLocatableEvent(action: SuspendContextCommandImpl, event: LocatableEvent?): Boolean {
val result = super.processLocatableEvent(action, event)
if (result) {
stepOverSuspendSwitch(action, debugProcess)
}
return result
}
}
breakpoint.setSuspendPolicy(context)
applyEmptyThreadFilter(debugProcess)
breakpoint.createRequest(debugProcess)
debugProcess.setRunToCursorBreakpoint(breakpoint)
return true
}
}
fun SuspendContextImpl.getLocationCompat(): Location? {
return this.frameProxy?.safeLocation()
}