Debugger: show line content instead of method content for breakpoint at line in drop-donw list
This commit is contained in:
@@ -148,4 +148,15 @@ public class KotlinLineBreakpointType extends JavaLineBreakpointType {
|
|||||||
return KotlinIcons.LAMBDA;
|
return KotlinIcons.LAMBDA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class KotlinLineBreakpointVariant extends ExactJavaBreakpointVariant {
|
||||||
|
public KotlinLineBreakpointVariant(XSourcePosition position, PsiElement element) {
|
||||||
|
super(position, element, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Icon getIcon() {
|
||||||
|
return KotlinIcons.FUNCTION;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ fun computeVariants(
|
|||||||
|
|
||||||
val mainMethod = KotlinLineBreakpointType.getContainingMethod(pos.elementAt)
|
val mainMethod = KotlinLineBreakpointType.getContainingMethod(pos.elementAt)
|
||||||
if (mainMethod != null) {
|
if (mainMethod != null) {
|
||||||
result.add((kotlinBreakpointType as JavaLineBreakpointType).ExactJavaBreakpointVariant(
|
result.add(kotlinBreakpointType.KotlinLineBreakpointVariant(
|
||||||
XSourcePositionImpl.createByElement(mainMethod),
|
XSourcePositionImpl.createByElement(mainMethod),
|
||||||
mainMethod, -1))
|
CodeInsightUtils.getTopmostElementAtOffset(pos.elementAt, pos.offset) ?: mainMethod))
|
||||||
}
|
}
|
||||||
|
|
||||||
lambdas.forEachIndexed { ordinal, lambda ->
|
lambdas.forEachIndexed { ordinal, lambda ->
|
||||||
|
|||||||
Reference in New Issue
Block a user