Skip to content

Commit 77be489

Browse files
authored
Disable breakpoint Entry&Exit toggle actions for lambda breakpoints (#803)
Enabling exit will make debugger suspend at random lambdas and by default lambda method breakpoints are already enabled
1 parent c005f63 commit 77be489

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/EntryToggleAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2012 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -47,7 +47,7 @@ public boolean isEnabledFor(IStructuredSelection selection) {
4747
Iterator<?> iter= selection.iterator();
4848
while (iter.hasNext()) {
4949
Object element = iter.next();
50-
if (!(element instanceof IJavaMethodBreakpoint)) {
50+
if (!(element instanceof IJavaMethodBreakpoint javaMethodBp && !javaMethodBp.isLambdaBreakpoint())) {
5151
return false;
5252
}
5353

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/actions/ExitToggleAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000, 2012 IBM Corporation and others.
2+
* Copyright (c) 2000, 2025 IBM Corporation and others.
33
*
44
* This program and the accompanying materials
55
* are made available under the terms of the Eclipse Public License 2.0
@@ -47,7 +47,7 @@ public boolean isEnabledFor(IStructuredSelection selection) {
4747
Iterator<?> iter= selection.iterator();
4848
while (iter.hasNext()) {
4949
Object element = iter.next();
50-
if (!(element instanceof IJavaMethodBreakpoint)) {
50+
if (!(element instanceof IJavaMethodBreakpoint javaMethodBp && !javaMethodBp.isLambdaBreakpoint())) {
5151
return false;
5252
}
5353

0 commit comments

Comments
 (0)