mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
[debugger] Kotlin line breakpoint variant highlights the whole line, IDEA-338225
Originally Kotlin highlighted only statement to get rid of leading spaces (KTIJ-10788), but since then "Line" is shown instead of line text. So it should be safe. ^IDEA-338225 fixed GitOrigin-RevId: c4dba4b8699105332f63bda0873c0d00838efc0b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
424e5d0867
commit
85b00ab231
@@ -367,8 +367,8 @@ public class JavaLineBreakpointType extends JavaLineBreakpointTypeBase<JavaLineB
|
||||
}
|
||||
|
||||
public class LineJavaBreakpointVariant extends ExactJavaBreakpointVariant {
|
||||
public LineJavaBreakpointVariant(@NotNull XSourcePosition position, @Nullable PsiElement element, int lambdaOrdinal) {
|
||||
super(position, element, JavaLineBreakpointProperties.encodeInlinePosition(lambdaOrdinal, false));
|
||||
public LineJavaBreakpointVariant(@NotNull XSourcePosition position, @Nullable PsiElement method, int lambdaOrdinal) {
|
||||
super(position, method, JavaLineBreakpointProperties.encodeInlinePosition(lambdaOrdinal, false));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -122,8 +122,7 @@ class KotlinLineBreakpointType :
|
||||
val isLambdaResult = bodyExpression is KtLambdaExpression && bodyExpression.functionLiteral in lambdas
|
||||
|
||||
if (!isLambdaResult) {
|
||||
val variantElement = getTopmostElementAtOffset(elementAt, pos.offset)
|
||||
result.add(LineKotlinBreakpointVariant(position, variantElement, -1))
|
||||
result.add(LineKotlinBreakpointVariant(position, mainMethod, -1))
|
||||
mainMethodAdded = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,13 @@ fun foo6() = when (2 + 3) { /// M, L
|
||||
// Line breakpoint should not be displayed for lambda literal results
|
||||
fun foo7() = { println() } /// M, λ
|
||||
|
||||
fun foo7_1() = { /// M, λ
|
||||
println() /// L
|
||||
} /// L
|
||||
|
||||
fun foo7_2() = /// M
|
||||
{ println() } /// *, L, λ
|
||||
|
||||
fun foo8() = (3 + 5).run { /// *, L, M, λ
|
||||
println() /// L
|
||||
} /// L
|
||||
|
||||
Reference in New Issue
Block a user