Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-08-17 16:28:01 -0400
committereutarass2011-08-17 16:28:01 -0400
commite77736364416f31b30449d5e518f7dc6fc5531d0 (patch)
treea6e82149ed1e290b4801b41108d976c3ecf8a5bc /plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse
parentb5b20b05510ecdcc1d091bb65f05fbe7abd3c939 (diff)
downloadorg.eclipse.tcf-e77736364416f31b30449d5e518f7dc6fc5531d0.tar.gz
org.eclipse.tcf-e77736364416f31b30449d5e518f7dc6fc5531d0.tar.xz
org.eclipse.tcf-e77736364416f31b30449d5e518f7dc6fc5531d0.zip
TCF Debugger: implemented new debugger preference: Delay children list updates in the Debug View until a child context is suspended.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java7
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java3
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java1
5 files changed, 37 insertions, 2 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 c6aefc5ee..74bd94acf 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
@@ -183,6 +183,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
private int suspend_trigger_generation;
private int auto_disconnect_generation;
+ // Debugger preferences:
private long min_view_updates_interval;
private boolean view_updates_throttle_enabled;
private boolean channel_throttle_enabled;
@@ -193,6 +194,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
private int stack_frames_limit_value;
private boolean show_function_arg_names;
private boolean show_function_arg_values;
+ private boolean delay_children_list_updates;
private final Map<String,String> action_results = new HashMap<String,String>();
private final HashMap<String,TCFAction> active_actions = new HashMap<String,TCFAction>();
@@ -625,6 +627,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
stack_frames_limit_value = prefs.getInt(TCFPreferences.PREF_STACK_FRAME_LIMIT_VALUE);
show_function_arg_names = prefs.getBoolean(TCFPreferences.PREF_STACK_FRAME_ARG_NAMES);
show_function_arg_values = prefs.getBoolean(TCFPreferences.PREF_STACK_FRAME_ARG_VALUES);
+ delay_children_list_updates = prefs.getBoolean(TCFPreferences.PREF_DELAY_CHILDREN_LIST_UPDATES);
Protocol.invokeLater(new Runnable() {
public void run() {
for (TCFNode n : id2node.values()) {
@@ -798,6 +801,10 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
return show_function_arg_values;
}
+ public boolean getDelayChildrenListUpdates() {
+ return delay_children_list_updates;
+ }
+
void onProxyInstalled(TCFModelProxy mp) {
IPresentationContext pc = mp.getPresentationContext();
model_proxies.put(mp.getPresentationContext(), mp);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
index 81ddf15cb..c216607c8 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
@@ -124,6 +124,8 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
private TCFNode[] last_stack_trace;
private String last_label;
private ImageDescriptor last_image;
+ private ChildrenStateInfo last_children_state_info;
+ private boolean delayed_children_list_delta;
private String hover_expression;
@@ -1031,6 +1033,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
}
}
+ last_children_state_info = null;
}
else {
// Thread container (process)
@@ -1039,6 +1042,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
if (i.suspended) image_name = ImageCache.IMG_PROCESS_SUSPENDED;
else image_name = ImageCache.IMG_PROCESS_RUNNING;
suspended_by_bp = i.breakpoint;
+ last_children_state_info = i;
}
}
}
@@ -1074,6 +1078,11 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
void postContextAddedDelta() {
+ if (last_children_state_info != null && !last_children_state_info.suspended && model.getDelayChildrenListUpdates()) {
+ // Delay content update until a child is suspended.
+ delayed_children_list_delta = true;
+ return;
+ }
for (TCFModelProxy p : model.getModelProxies()) {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(p.getPresentationContext().getId())) {
/* Note: should use IModelDelta.INSERTED but it is broken in Eclipse 3.6 */
@@ -1083,6 +1092,11 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
private void postContextRemovedDelta() {
+ if (last_children_state_info != null && !last_children_state_info.suspended && model.getDelayChildrenListUpdates()) {
+ // Delay content update until a child is suspended.
+ delayed_children_list_delta = true;
+ return;
+ }
for (TCFModelProxy p : model.getModelProxies()) {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(p.getPresentationContext().getId())) {
p.addDelta(this, IModelDelta.REMOVED);
@@ -1091,6 +1105,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
private void postContentChangedDelta() {
+ delayed_children_list_delta = false;
for (TCFModelProxy p : model.getModelProxies()) {
int flags = 0;
String view_id = p.getPresentationContext().getId();
@@ -1113,7 +1128,9 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
postContentChangedDelta();
TCFNode n = this;
while (n instanceof TCFNodeExecContext) {
- ((TCFNodeExecContext)n).postStateChangedDelta();
+ TCFNodeExecContext e = (TCFNodeExecContext)n;
+ if (e.delayed_children_list_delta) e.postContentChangedDelta();
+ e.postStateChangedDelta();
n = n.parent;
}
}
@@ -1330,6 +1347,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
void onPreferencesChanged() {
+ if (delayed_children_list_delta && !model.getDelayChildrenListUpdates()) postContentChangedDelta();
children_stack.onPreferencesChanged();
postStackChangedDelta();
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java
index a7d05a653..1f5766722 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFDebugPreferencePage.java
@@ -50,6 +50,14 @@ public class TCFDebugPreferencePage extends FieldEditorPreferencePage implements
group.setLayout(layout);
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ BooleanFieldEditor autoThreadListUpdates = new BooleanFieldEditor(
+ TCFPreferences.PREF_DELAY_CHILDREN_LIST_UPDATES,
+ "Delay children list updates in the Debug View until a child context is suspended",
+ group);
+
+ autoThreadListUpdates.fillIntoGrid(group, 3);
+ addField(autoThreadListUpdates);
+
BooleanFieldEditor syncSteppingEditor = new BooleanFieldEditor(
TCFPreferences.PREF_WAIT_FOR_PC_UPDATE_AFTER_STEP,
"Wait for editor marker to update after every step",
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java
index eaeeb6f1f..3e950c289 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferences.java
@@ -26,7 +26,8 @@ public class TCFPreferences {
PREF_MIN_STEP_INTERVAL = "MinStepInterval",
PREF_MIN_UPDATE_INTERVAL = "MinUpdateInterval",
PREF_VIEW_UPDATES_THROTTLE = "ViewUpdatesThrottle",
- PREF_TARGET_TRAFFIC_THROTTLE = "TargetTrafficThrottle";
+ PREF_TARGET_TRAFFIC_THROTTLE = "TargetTrafficThrottle",
+ PREF_DELAY_CHILDREN_LIST_UPDATES = "DelayChildrenListUpdates";
public static IPreferenceStore getPreferenceStore() {
return Activator.getDefault().getPreferenceStore();
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java
index a42df7751..63dc82c36 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/preferences/TCFPreferencesInitializer.java
@@ -30,5 +30,6 @@ public class TCFPreferencesInitializer extends AbstractPreferenceInitializer {
prefs.setDefault(TCFPreferences.PREF_MIN_UPDATE_INTERVAL, 50);
prefs.setDefault(TCFPreferences.PREF_VIEW_UPDATES_THROTTLE, true);
prefs.setDefault(TCFPreferences.PREF_TARGET_TRAFFIC_THROTTLE, true);
+ prefs.setDefault(TCFPreferences.PREF_DELAY_CHILDREN_LIST_UPDATES, true);
}
}

Back to the top