Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-08-23 15:53:44 -0400
committerEugene Tarassov2013-08-23 15:53:44 -0400
commit9584835748a167cb61eaa11a2a2c9c3973259a2a (patch)
tree8c952575ac35331d46f5f0b887560ff632b2b0de
parent46b8856d2281edfbfe534954dbdd658d699d8a0a (diff)
downloadorg.eclipse.tcf-9584835748a167cb61eaa11a2a2c9c3973259a2a.tar.gz
org.eclipse.tcf-9584835748a167cb61eaa11a2a2c9c3973259a2a.tar.xz
org.eclipse.tcf-9584835748a167cb61eaa11a2a2c9c3973259a2a.zip
TCF Debugger: Profiler view: better handling of Debug view selection changes
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java26
2 files changed, 17 insertions, 11 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
index b50116a1d..152c0f45c 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
@@ -49,7 +49,7 @@ public class ProcessesV1Proxy extends ProcessesProxy implements IProcessesV1 {
}
}.token;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.tcf.services.IProcessesV1#getCapabilities(java.lang.String, org.eclipse.tcf.services.IProcessesV1.DoneGetCapabilities)
*/
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java
index 954cf9dc7..94f8a8e86 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/profiler/ProfilerView.java
@@ -542,21 +542,27 @@ public class ProfilerView extends ViewPart {
action_stop.setEnabled(enable_stop);
profile_node = node;
Object viewer_input = prof_data != null ? prof_data.entries : null;
- ISelection s = viewer_main.getSelection();
- ProfilerView.this.sample_count = sample_count;
- viewer_main.setInput(viewer_input);
- if (s instanceof IStructuredSelection && entries.size() > 0) {
- IStructuredSelection ss = (IStructuredSelection)s;
+ if (viewer_main.getInput() != viewer_input) {
+ ISelection s = viewer_main.getSelection();
+ ProfilerView.this.sample_count = sample_count;
+ viewer_main.setInput(viewer_input);
List<ProfileEntry> l = new ArrayList<ProfileEntry>();
- for (Object obj : ss.toArray()) {
- if (obj instanceof ProfileEntry) {
- ProfileEntry pe = (ProfileEntry)obj;
- pe = entries.get(pe.addr);
- if (pe != null) l.add(pe);
+ if (s instanceof IStructuredSelection && entries.size() > 0) {
+ IStructuredSelection ss = (IStructuredSelection)s;
+ for (Object obj : ss.toArray()) {
+ if (obj instanceof ProfileEntry) {
+ ProfileEntry pe = (ProfileEntry)obj;
+ pe = entries.get(pe.addr);
+ if (pe != null) l.add(pe);
+ }
}
}
setSelection(l, false);
}
+ else {
+ // Sorting might be changed, need to refresh
+ viewer_main.refresh();
+ }
if (!enable_start) {
status.setText("Selected context does not support profiling");
}

Back to the top