IJOB-599 Fix breakpoint task in onboarding lessons

After remote-dev changes we cannot rely on change by action-finished event


(cherry picked from commit ba806f773db503ad3b02c3a2e55c920049153c37)

IJ-CR-167265

GitOrigin-RevId: 645795be223e4501a5f12e723d71f6793c3fef4d
This commit is contained in:
Alexey.Merkulov
2025-06-26 15:16:38 +02:00
committed by intellij-monorepo-bot
parent a4d0f2eccf
commit 9c5ed69c24

View File

@@ -472,7 +472,6 @@ fun LessonContext.toggleBreakpointTask(sample: LessonSample?,
logicalPosition: () -> LogicalPosition,
checkLine: Boolean = true,
breakpointXRange: (width: Int) -> IntRange = LessonUtil.breakpointXRange,
useCheckByTimerInsteadOfStateCheck: Boolean = false,
textContent: TaskContext.() -> Unit) {
highlightBreakpointGutter(breakpointXRange, logicalPosition)
@@ -483,12 +482,7 @@ fun LessonContext.toggleBreakpointTask(sample: LessonSample?,
val checkLambda: TaskRuntimeContext.() -> Boolean = {
lineWithBreakpoints() == setOf(logicalPosition().line)
}
if (useCheckByTimerInsteadOfStateCheck) {
timerCheck(checkState = checkLambda)
}
else {
stateCheck(checkLambda)
}
timerCheck(checkState = checkLambda)
proposeRestore {
val breakpoints = lineWithBreakpoints()