diff options
author | Anton Leherbauer | 2014-02-07 13:08:37 +0000 |
---|---|---|
committer | Anton Leherbauer | 2014-02-07 13:31:32 +0000 |
commit | e589e4947a29d0ad70866728be43858cefc45535 (patch) | |
tree | 05ba783d1b9dd49750e980aa4e489e53c07f85fe /plugins/org.eclipse.tcf.cdt.ui | |
parent | 4e46a81fdffb273be2452129789df70ff371216e (diff) | |
download | org.eclipse.tcf-e589e4947a29d0ad70866728be43858cefc45535.tar.gz org.eclipse.tcf-e589e4947a29d0ad70866728be43858cefc45535.tar.xz org.eclipse.tcf-e589e4947a29d0ad70866728be43858cefc45535.zip |
TCF Debugger: Fix check-state handling in breakpoint scope page
- Context.equals() needs to take into account the session id
- parent check-state should depend on visible children only
Diffstat (limited to 'plugins/org.eclipse.tcf.cdt.ui')
-rw-r--r-- | plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java index 9e8ab1ce8..ddd81d23c 100644 --- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java +++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/breakpoints/TCFThreadFilterEditor.java @@ -108,12 +108,12 @@ public class TCFThreadFilterEditor { @Override public boolean equals(Object obj) { - return obj instanceof Context && fId.equals(((Context)obj).fId); + return obj instanceof Context && fScopeId.equals(((Context)obj).fScopeId); } @Override public int hashCode() { - return fId.hashCode(); + return fScopeId.hashCode(); } } @@ -137,9 +137,9 @@ public class TCFThreadFilterEditor { private void checkLaunch(ILaunch launch, boolean checked) { getThreadViewer().setChecked(launch, checked); getThreadViewer().setGrayed(launch, false); - Context[] threads = syncGetContainers((TCFLaunch) launch); + Object[] threads = fContentProvider.getChildren(launch); for (int i = 0; i < threads.length; i++) { - checkContext(threads[i], checked); + checkContext((Context) threads[i], checked); } } @@ -150,9 +150,9 @@ public class TCFThreadFilterEditor { */ private void checkContext(Context ctx, boolean checked) { if (ctx.fIsContainer) { - Context[] threads = syncGetThreads(ctx); + Object[] threads = fContentProvider.getChildren(ctx); for (int i = 0; i < threads.length; i++) { - checkContext(threads[i], checked); + checkContext((Context) threads[i], checked); } } checkThread(ctx, checked); @@ -167,16 +167,13 @@ public class TCFThreadFilterEditor { } private void updateParentCheckState(Context thread) { - Context[] threads; + Object[] threads; Object parent = getContainer(thread); if (parent == null) { parent = getLaunch(thread); if (parent == null) return; - threads = syncGetContainers((TCFLaunch) parent); - } - else { - threads = syncGetThreads((Context) parent); } + threads = fContentProvider.getChildren(parent); int checkedNumber = 0; int grayedNumber = 0; for (int i = 0; i < threads.length; i++) { @@ -479,7 +476,9 @@ public class TCFThreadFilterEditor { if (fThreadViewer != null) { fThreadViewer.refresh(); fFilteredContexts.clear(); - setInitialCheckedState(); + for (Context ctx : fContexts) { + fCheckHandler.updateParentCheckState(ctx); + } } } } |