mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
[debugger] make Java breakpoint variants more clear
Rename "All" to "Line and Lambdas" as in Kotlin GitOrigin-RevId: aa7adde794ec482b94372a8a3865e52db1475afa
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4ea4cd5131
commit
f7e1075301
@@ -124,7 +124,7 @@ public class JavaLineBreakpointType extends JavaLineBreakpointTypeBase<JavaLineB
|
||||
List<JavaBreakpointVariant> res = new SmartList<>();
|
||||
|
||||
boolean baseMethodWasAdded = false;
|
||||
boolean anyLambdaWasAdded = false;
|
||||
int lambdaCount = 0;
|
||||
if (!(startMethod instanceof PsiLambdaExpression)) {
|
||||
baseMethodWasAdded = true;
|
||||
res.add(new LineJavaBreakpointVariant(position, startMethod, -1));
|
||||
@@ -141,7 +141,7 @@ public class JavaLineBreakpointType extends JavaLineBreakpointTypeBase<JavaLineB
|
||||
res.add(0, new LineJavaBreakpointVariant(elementPosition, lambda, ordinal++));
|
||||
}
|
||||
else {
|
||||
anyLambdaWasAdded = true;
|
||||
lambdaCount++;
|
||||
res.add(new LambdaJavaBreakpointVariant(elementPosition, lambda, ordinal++));
|
||||
}
|
||||
}
|
||||
@@ -149,8 +149,8 @@ public class JavaLineBreakpointType extends JavaLineBreakpointTypeBase<JavaLineB
|
||||
}
|
||||
assert baseMethodWasAdded;
|
||||
|
||||
if (anyLambdaWasAdded) {
|
||||
res.add(new JavaBreakpointVariant(position)); //all
|
||||
if (lambdaCount > 0) {
|
||||
res.add(new JavaBreakpointVariant(position, lambdaCount)); //all
|
||||
}
|
||||
|
||||
if (condRet != null) {
|
||||
@@ -161,7 +161,7 @@ public class JavaLineBreakpointType extends JavaLineBreakpointTypeBase<JavaLineB
|
||||
res.add(new ConditionalReturnJavaBreakpointVariant(position, condRet, ordinal)); //conditional return
|
||||
}
|
||||
|
||||
assert anyLambdaWasAdded || condRet != null;
|
||||
assert lambdaCount > 0 || condRet != null;
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -273,8 +273,16 @@ public class JavaLineBreakpointType extends JavaLineBreakpointTypeBase<JavaLineB
|
||||
}
|
||||
|
||||
public class JavaBreakpointVariant extends XLineBreakpointAllVariant {
|
||||
public JavaBreakpointVariant(@NotNull XSourcePosition position) {
|
||||
private final int lambdaCount;
|
||||
|
||||
public JavaBreakpointVariant(@NotNull XSourcePosition position, int lambdaCount) {
|
||||
super(position);
|
||||
this.lambdaCount = lambdaCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getText() {
|
||||
return JavaDebuggerBundle.message("breakpoint.variant.text.line.and.lambda", lambdaCount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,7 +291,7 @@ public class JavaLineBreakpointType extends JavaLineBreakpointTypeBase<JavaLineB
|
||||
private final Integer myEncodedInlinePosition;
|
||||
|
||||
public ExactJavaBreakpointVariant(@NotNull XSourcePosition position, @Nullable PsiElement element, Integer encodedInlinePosition) {
|
||||
super(position);
|
||||
super(position, -1 /* unused */);
|
||||
myElement = element;
|
||||
myEncodedInlinePosition = encodedInlinePosition;
|
||||
}
|
||||
|
||||
@@ -517,6 +517,7 @@ memory.view.constructor.tracker.name=MemoryViewConstructorTracker: {0}
|
||||
capture.node.settings.link=\ settings
|
||||
array.filter.node.clear.link=\ clear
|
||||
breakpoint.variant.text.line=Line
|
||||
breakpoint.variant.text.line.and.lambda=Line and {0,choice,1#Lambda|2#Lambdas}
|
||||
debugger.attach.group.name.java=Java
|
||||
debugger.attach.group.name.java.read.only=Java Read Only
|
||||
debugger.memory.agent.timeout.error=Calculation timeout (heap is too large and memory agent can't execute this operation in reasonable time, it's preferable to capture the heap dump)
|
||||
|
||||
Reference in New Issue
Block a user