[Monodevelop-patches-list] r2400 - in trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn: . Gui

Chris Toshok toshok at mono-cvs.ximian.com
Tue Mar 29 16:20:21 EST 2005


Author: toshok
Date: 2005-03-29 16:20:20 -0500 (Tue, 29 Mar 2005)
New Revision: 2400

Modified:
   trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerStackTracePad.cs
   trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerVariablePad.cs
Log:
2005-03-29  Chris Toshok  <toshok at ximian.com>

	* Gui/DebuggerVariablePad.cs: display "this" if we're in a method
	that has it.

	* Gui/DebuggerStackTracePad.cs: update the currently displayed
	rows instead of clearing the tree and adding every frame to cut
	down on flashing.



Modified: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog	2005-03-29 13:26:56 UTC (rev 2399)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog	2005-03-29 21:20:20 UTC (rev 2400)
@@ -1,5 +1,14 @@
 2005-03-29  Chris Toshok  <toshok at ximian.com>
 
+	* Gui/DebuggerVariablePad.cs: display "this" if we're in a method
+	that has it.
+
+	* Gui/DebuggerStackTracePad.cs: update the currently displayed
+	rows instead of clearing the tree and adding every frame to cut
+	down on flashing.
+
+2005-03-29  Chris Toshok  <toshok at ximian.com>
+
 	* Gui/DebuggerVariablePad.cs: make this a lot nicer.  we update
 	entries now instead of clearing/re-adding everything.  also,
 	display icons now.

Modified: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerStackTracePad.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerStackTracePad.cs	2005-03-29 13:26:56 UTC (rev 2399)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerStackTracePad.cs	2005-03-29 21:20:20 UTC (rev 2400)
@@ -50,43 +50,41 @@
 			dbgr.StoppedEvent += new EventHandler (OnStoppedEvent);
 		}
 
-		void add_frame (string frame)
-		{
-			TreeIter iter;
-			store.Append (out iter);
-			store.SetValue (iter, 0, new GLib.Value (frame));
-		}
-
-		Hashtable iters = null;
-
-		public void CleanDisplay ()
-		{
-			store.Clear ();
-			iters = new Hashtable ();
-		}
-
 		public void UpdateDisplay ()
 		{
-			CleanDisplay ();
-
 			if ((current_frame == null) || (current_frame.Method == null))
 				return;
 
 			DebuggingService dbgr = (DebuggingService)ServiceManager.GetService (typeof (DebuggingService));
 			string[] trace = dbgr.Backtrace;
 
-			foreach (string frame in trace)
-				add_frame (frame);
+			TreeIter it;
+			if (!store.GetIterFirst (out it)) {
+				foreach (string frame in trace) {
+					store.Append (out it);
+					store.SetValue (it, 0, frame);
+				}
+			}
+			else {
+				for (int i = 0; i < trace.Length; i ++) {
+					store.SetValue (it, 0, trace[i]);
+					if (i < trace.Length - 1 && !store.IterNext (ref it))
+						store.Append (out it);
+				}
+				/* clear any remaining rows */
+				if (store.IterNext (ref it))
+					do { } while (store.Remove (ref it));
+			}
 		}
 
 		protected void OnStoppedEvent (object o, EventArgs args)
 		{
-			CleanDisplay ();
+			UpdateDisplay ();
 		}
 
 		protected void OnResumedEvent (object o, EventArgs args)
 		{
-			CleanDisplay ();
+			UpdateDisplay ();
 		}
 
 		protected void OnPausedEvent (object o, EventArgs args)
@@ -96,8 +94,6 @@
 			UpdateDisplay ();
 		}
 
-
-
 		public Gtk.Widget Control {
 			get {
 				return this;

Modified: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerVariablePad.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerVariablePad.cs	2005-03-29 13:26:56 UTC (rev 2399)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Gui/DebuggerVariablePad.cs	2005-03-29 21:20:20 UTC (rev 2400)
@@ -592,6 +592,10 @@
 				}
 
 				if (is_locals_display) {
+					if (current_frame.Method.HasThis) {
+						UpdateVariable (current_frame.Method.This);
+						vars_to_remove.Remove (current_frame.Method.This);
+					}
 					IVariable[] local_vars = current_frame.Method.Locals;
 					foreach (IVariable var in local_vars) {
 						UpdateVariable (var);




More information about the Monodevelop-patches-list mailing list