Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-12-16 12:34:26 -0500
committerPawel Piech2009-12-16 12:34:26 -0500
commit6d212182e9b60f0382a29cc9e1e8524cc2b1b448 (patch)
tree4a56e8e3d77588ccb8a0cf9af99cd62034a45835 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model
parenta2d9cb32e81b12ab3c31d311488f5bbb2a1aadcb (diff)
downloadeclipse.platform.debug-6d212182e9b60f0382a29cc9e1e8524cc2b1b448.tar.gz
eclipse.platform.debug-6d212182e9b60f0382a29cc9e1e8524cc2b1b448.tar.xz
eclipse.platform.debug-6d212182e9b60f0382a29cc9e1e8524cc2b1b448.zip
Bug 297853 - Breakpoint groups hagged up in new breakpoints view
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java
index 7d47df900..939c0a715 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/AbstractBreakpointManagerContentProvider.java
@@ -448,6 +448,11 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo
final private Map fInputToData = Collections.synchronizedMap(new InputDataMap());
/**
+ * Flag indicating whether the content provider is currently a breakpoints listener.
+ */
+ private boolean fIsBreakpointListener = false;
+
+ /**
* A map of presetnation context listeners.
*/
final private Map fContextListeners = Collections.synchronizedMap(new HashMap());
@@ -564,10 +569,13 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo
* @param comparator the element comparator.
*/
public void registerModelProxy(AbstractBreakpointManagerInput input, AbstractModelProxy proxy) {
- if (fInputToData.isEmpty()) {
- fBpManager.addBreakpointListener(this);
- }
-
+ synchronized(this) {
+ if (!fIsBreakpointListener) {
+ fBpManager.addBreakpointListener(this);
+ fIsBreakpointListener = true;
+ }
+ }
+
getInputData(input).proxyInstalled(proxy);
}
@@ -580,7 +588,12 @@ public abstract class AbstractBreakpointManagerContentProvider extends ElementCo
getInputData(input).proxyDisposed(proxy);
if (fInputToData.isEmpty()) {
- fBpManager.removeBreakpointListener(this);
+ synchronized(this) {
+ if (fIsBreakpointListener) {
+ fBpManager.removeBreakpointListener(this);
+ fIsBreakpointListener = false;
+ }
+ }
}
}

Back to the top