Bug 530255 - [Breakpoint] Trigger points with conditionals never break
Change-Id: Ibc9d0d6dfdd3fc8b3cfc1ad867c36bac064560e1
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java
index ba6a3fe..574aab6 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -471,10 +471,16 @@
protected void disableTriggerPoint(Event event) {
try{
if (isTriggerPoint() && isEnabled()) {
- DebugPlugin.getDefault().getBreakpointManager().enableTriggerPoints(null, false);
+ if (this instanceof JavaLineBreakpoint) {
+ JavaLineBreakpoint lbp = (JavaLineBreakpoint) this;
+ if (lbp.hasCondition()) {
+ return;
+ }
+ }
+ DebugPlugin.getDefault().getBreakpointManager().enableTriggerPoints(null, false);
// make a note that we auto-disabled the trigger point for this breakpoint.
// we re enable it at cleanup of JDITarget
- }
+ }
}catch (CoreException ce) {
JDIDebugPlugin.log(ce);
}
diff --git a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
index 3f8b497..2bb06cb 100644
--- a/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
+++ b/org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/model/JDIThread.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -1473,6 +1473,9 @@
return true;
}
}
+ DebugPlugin.getDefault().getBreakpointManager().enableTriggerPoints(null, false);
+ // make a note that we auto-disabled the trigger point for this breakpoint.
+ // we re enable it at cleanup of JDITarget
}
}