diff options
author | aleherbau | 2011-05-13 10:48:09 +0000 |
---|---|---|
committer | aleherbau | 2011-05-13 10:48:09 +0000 |
commit | 9d6bf7390a666ee1d1244afb366b605bc19a6ab6 (patch) | |
tree | ed861e5ef406a18bb7f4e3bc5a166dbd90b58e9f | |
parent | dd01934953e1ec4b8a527bec1a297c264836702f (diff) | |
download | org.eclipse.tcf-9d6bf7390a666ee1d1244afb366b605bc19a6ab6.tar.gz org.eclipse.tcf-9d6bf7390a666ee1d1244afb366b605bc19a6ab6.tar.xz org.eclipse.tcf-9d6bf7390a666ee1d1244afb366b605bc19a6ab6.zip |
TCF Debugger: Fixed context ordering in breakpoint Scope page, empty scope not working
2 files changed, 15 insertions, 6 deletions
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java index 3b584dc67..bd9e2a073 100644 --- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java +++ b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFBreakpointScopeExtension.java @@ -47,11 +47,17 @@ public class TCFBreakpointScopeExtension implements ICBreakpointExtension { }
String contextIdAttr = null;
if (threadIds != null) {
- StringBuilder buf = new StringBuilder();
- for (String id : threadIds) {
- buf.append(id).append(',');
+ if (threadIds.length == 0) {
+ // empty string is filtered out in TCFBreakpointsModel
+ contextIdAttr = " ";
+ } else {
+ StringBuilder buf = new StringBuilder();
+ for (int i=0; i < threadIds.length - 1; ++i) {
+ buf.append(threadIds[i]).append(',');
+ }
+ buf.append(threadIds[threadIds.length - 1]);
+ contextIdAttr = buf.toString();
}
- contextIdAttr = buf.toString();
}
try {
m.setAttribute(ATTR_CONTEXT_IDS, contextIdAttr);
diff --git a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFThreadFilterEditor.java b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFThreadFilterEditor.java index eff276171..23184510f 100644 --- a/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFThreadFilterEditor.java +++ b/plugins/org.eclipse.tm.tcf.cdt.ui/src/org/eclipse/tm/internal/tcf/cdt/ui/breakpoints/TCFThreadFilterEditor.java @@ -13,6 +13,7 @@ package org.eclipse.tm.internal.tcf.cdt.ui.breakpoints; import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -385,8 +386,10 @@ public class TCFThreadFilterEditor { TCFModel model = TCFModelManager.getModelManager().getModel(launch);
TCFChildren children = ((TCFNodeExecContext) model.getNode(container.fId)).getChildren();
if (!children.validate(this)) return;
- Map<String, TCFNode> childMap = children.getData();
- for (TCFNode node : childMap.values()) {
+ Collection<TCFNode> childNodes = children.getData().values();
+ TCFNode[] nodes = childNodes.toArray(new TCFNode[childNodes.size()]);
+ Arrays.sort(nodes);
+ for (TCFNode node : nodes) {
if (node instanceof TCFNodeExecContext) {
TCFNodeExecContext exeCtx = (TCFNodeExecContext) node;
TCFDataCache<IRunControl.RunControlContext> runCtxCache = exeCtx.getRunContext();
|