aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarika Sinha2018-09-03 02:16:24 -0400
committerSarika Sinha2018-09-10 01:19:31 -0400
commit244cac5a57dd6207923acaf7daa223aebcd046db (patch)
treeefdea28c9e7db5cf7ee945c52e9aa8d6b1049b55
parent92f38955843560593b728ee91018277eaa1b1592 (diff)
downloadeclipse.platform.debug-244cac5a57dd6207923acaf7daa223aebcd046db.tar.gz
eclipse.platform.debug-244cac5a57dd6207923acaf7daa223aebcd046db.tar.xz
eclipse.platform.debug-244cac5a57dd6207923acaf7daa223aebcd046db.zip
Bug 520346 - Disabled trigger point gets enabled automaticallyI20180910-0310
-rw-r--r--org.eclipse.debug.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java23
-rw-r--r--org.eclipse.debug.core/pom.xml2
3 files changed, 23 insertions, 4 deletions
diff --git a/org.eclipse.debug.core/META-INF/MANIFEST.MF b/org.eclipse.debug.core/META-INF/MANIFEST.MF
index 930cbe6ec..aedbece23 100644
--- a/org.eclipse.debug.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.debug.core; singleton:=true
-Bundle-Version: 3.13.0.qualifier
+Bundle-Version: 3.13.100.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.debug.core.DebugPlugin
Bundle-Vendor: %providerName
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
index 49d1d1242..c97f93706 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
@@ -160,6 +160,12 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
*/
private Set<IBreakpoint> fTriggerPointBreakpointList = new LinkedHashSet<>();
+ /**
+ * Trigger points disabled by system after the first trigger point is
+ * enabled in a workspace.
+ */
+ private Set<IBreakpoint> fTriggerPointDisabledList = new LinkedHashSet<>();
+
/**
* Listens to POST_CHANGE notifications of breakpoint markers to detect when
@@ -1415,21 +1421,34 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
}
@Override
- public void enableTriggerPoints(IBreakpoint[] triggerPoints, boolean enable) {
+ public synchronized void enableTriggerPoints(IBreakpoint[] triggerPoints, boolean enable) {
IBreakpoint[] triggerPointList = triggerPoints;
if (triggerPoints == null) {
- triggerPointList = fTriggerPointBreakpointList.toArray(new IBreakpoint[0]);
+ if (enable) {
+ triggerPointList = fTriggerPointDisabledList.toArray(new IBreakpoint[0]);
+ } else {
+ triggerPointList = fTriggerPointBreakpointList.toArray(new IBreakpoint[0]);
+ if (!fTriggerPointDisabledList.isEmpty()) {
+ fTriggerPointDisabledList = new LinkedHashSet<>();
+ }
+ }
}
for (IBreakpoint iBreakpoint : triggerPointList) {
try {
IMarker m = iBreakpoint.getMarker();
if (m != null && m.exists()) {
+ if (!enable && iBreakpoint.isEnabled()) {
+ fTriggerPointDisabledList.add(iBreakpoint);
+ }
iBreakpoint.setEnabled(enable);
}
} catch (CoreException e) {
e.printStackTrace();
}
}
+ if (enable) {
+ fTriggerPointDisabledList = new LinkedHashSet<>();
+ }
}
@Override
diff --git a/org.eclipse.debug.core/pom.xml b/org.eclipse.debug.core/pom.xml
index 77e0f7673..46426c93e 100644
--- a/org.eclipse.debug.core/pom.xml
+++ b/org.eclipse.debug.core/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.debug</groupId>
<artifactId>org.eclipse.debug.core</artifactId>
- <version>3.13.0-SNAPSHOT</version>
+ <version>3.13.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>