diff --git a/java/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/LineBreakpoint.java b/java/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/LineBreakpoint.java index 78726be196d7..0523f2e5d2c0 100644 --- a/java/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/LineBreakpoint.java +++ b/java/api.debugger.jpda/src/org/netbeans/api/debugger/jpda/LineBreakpoint.java @@ -24,6 +24,7 @@ import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; +import java.util.Arrays; import java.util.Collection; import java.util.Map; import java.util.WeakHashMap; @@ -67,6 +68,8 @@ public class LineBreakpoint extends JPDABreakpoint { /** Property name constant */ public static final String PROP_LINE_NUMBER = "lineNumber"; // NOI18N /** Property name constant */ + public static final String PROP_LAMBDA_INDEX = "lambdaIndex"; // NOI18N + /** Property name constant */ public static final String PROP_URL = "url"; // NOI18N /** Property name constant. */ public static final String PROP_CONDITION = "condition"; // NOI18N @@ -83,6 +86,9 @@ public class LineBreakpoint extends JPDABreakpoint { /** Property name constant */ public static final String PROP_THREAD_FILTERS = "threadFilters"; // NOI18N + /**Lambda index value meaning the debugger should stop at locations outside of any lambda.*/ + public static final int LAMBDA_INDEX_STOP_OUTSIDE = -1; + private static final Logger LOG = Logger.getLogger(LineBreakpoint.class.getName()); private String url = ""; // NOI18N @@ -94,6 +100,7 @@ public class LineBreakpoint extends JPDABreakpoint { private String className = null; private Map instanceFilters; private Map threadFilters; + private int[] lambdaIndex = new int[0]; private LineBreakpoint (String url) { @@ -182,6 +189,29 @@ public void setLineNumber (int ln) { Integer.valueOf(ln) ); } + + public int[] getLambdaIndex() { + return lambdaIndex.clone(); + } + + public void setLambdaIndex(int[] li) { + int[] old; + + li = li.clone(); + + synchronized (this) { + if (li == lambdaIndex) { + return; + } + old = lambdaIndex; + lambdaIndex = li; + } + firePropertyChange ( + PROP_LAMBDA_INDEX, + old, + li + ); + } /** * Get the instance filter for a specific debugger session. @@ -423,7 +453,7 @@ public String toString () { if (fileName == null) { fileName = url; } - return "LineBreakpoint " + fileName + " : " + lineNumber; + return "LineBreakpoint " + fileName + " : " + lineNumber + (lambdaIndex.length > 0 ? " lambda indices: " + Arrays.toString(lambdaIndex) : ""); } private static class LineBreakpointImpl extends LineBreakpoint diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/Bundle.properties b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/Bundle.properties index fe41db22e26f..d21a239259c2 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/Bundle.properties +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/Bundle.properties @@ -229,6 +229,11 @@ ACSD_TF_Line_Breakpoint_Line_Number=Line number TTT_TF_Line_Breakpoint_Line_Number=Line number to stop at + L_Line_Breakpoint_Lambda_Index=Lambda &Index\: + ACSD_L_Line_Breakpoint_Lambda_Index=Lambda Index + ACSD_TF_Line_Breakpoint_Lambda_Index=Lambda Index + TTT_TF_Line_Breakpoint_Lambda_Index=Lambda Index to stop at + L_Line_Breakpoint_Condition=Co&ndition: ACSD_L_Line_Breakpoint_Condition=Condition ACSD_TF_Line_Breakpoint_Condition=Condition diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.form b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.form index 5ea1b1c1ff72..9eb4f7f3a2d4 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.form +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/breakpoints/LineBreakpointPanel.form @@ -1,4 +1,4 @@ - +