Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-06-11 14:41:39 -0400
committereutarass2010-06-11 14:41:39 -0400
commit869c7c4ead7a29b37c1182ae726789e18e4f4596 (patch)
tree25200c734f54653035a8502b6876652d038e579d /plugins
parent0e0925f08537516db9908879671dd05ea4736cc6 (diff)
downloadorg.eclipse.tcf-869c7c4ead7a29b37c1182ae726789e18e4f4596.tar.gz
org.eclipse.tcf-869c7c4ead7a29b37c1182ae726789e18e4f4596.tar.xz
org.eclipse.tcf-869c7c4ead7a29b37c1182ae726789e18e4f4596.zip
TCF Debugger: fixed: Eclipse 3.6 can create multiple debug model proxies for Breakpoints view, causing assertion failure in TCFModel
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java19
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java6
2 files changed, 11 insertions, 14 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
index d002a15b7..062cd44cf 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
@@ -130,8 +130,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
private final Set<String> running_actions = new HashSet<String>();
private final Map<String,String> finished_actions = new HashMap<String,String>();
- private final Map<IPresentationContext,TCFModelProxy> model_proxies =
- new HashMap<IPresentationContext,TCFModelProxy>();
+ private final Set<TCFModelProxy> model_proxies = new HashSet<TCFModelProxy>();
private final Map<String,TCFNode> id2node = new HashMap<String,TCFNode>();
@@ -544,7 +543,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
void onContextActionsDone(String id, String result) {
running_actions.remove(id);
- for (TCFModelProxy p : model_proxies.values()) p.run();
+ for (TCFModelProxy p : model_proxies) p.run();
finished_actions.put(id, result);
setDebugViewSelection(id);
}
@@ -557,13 +556,13 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
return finished_actions.containsKey(id);
}
- void onProxyInstalled(final IPresentationContext p, final TCFModelProxy mp) {
- model_proxies.put(p, mp);
+ void onProxyInstalled(TCFModelProxy mp) {
+ model_proxies.add(mp);
}
- void onProxyDisposed(final IPresentationContext p) {
- assert model_proxies.containsKey(p);
- model_proxies.remove(p);
+ void onProxyDisposed(TCFModelProxy mp) {
+ assert model_proxies.contains(mp);
+ model_proxies.remove(mp);
}
private void onContextRemoved(final String[] context_ids) {
@@ -608,7 +607,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
* @param flags - description of what has changed: IModelDelta.ADDED, IModelDelta.REMOVED, etc.
*/
final void addDelta(TCFNode node, int flags) {
- for (TCFModelProxy p : model_proxies.values()) {
+ for (TCFModelProxy p : model_proxies) {
int f = flags & node.getRelevantModelDeltaFlags(p.getPresentationContext());
if (f != 0) p.addDelta(node, f);
}
@@ -797,7 +796,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (node == null) return;
if (node.disposed) return;
if (running_actions.contains(node_id)) return;
- for (TCFModelProxy proxy : model_proxies.values()) {
+ for (TCFModelProxy proxy : model_proxies) {
if (proxy.getPresentationContext().getId().equals(IDebugUIConstants.ID_DEBUG_VIEW)) {
proxy.setSelection(node);
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
index e18391c51..82951b7c0 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
@@ -146,8 +146,7 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy, Ru
Protocol.invokeAndWait(new Runnable() {
public void run() {
assert !disposed;
- IPresentationContext p = getPresentationContext();
- if (p != null) model.onProxyInstalled(p, TCFModelProxy.this);
+ model.onProxyInstalled(TCFModelProxy.this);
}
});
}
@@ -156,8 +155,7 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy, Ru
Protocol.invokeAndWait(new Runnable() {
public void run() {
assert !disposed;
- IPresentationContext p = getPresentationContext();
- if (p != null) model.onProxyDisposed(p);
+ model.onProxyDisposed(TCFModelProxy.this);
disposed = true;
}
});

Back to the top