[Monodevelop-patches-list] r1125 - in trunk/MonoDevelop: . build/AddIns src/AddIns/DisplayBindings/SourceEditor/Gui/Pads src/Main/Base src/Main/Base/Commands src/Main/Base/Gui/Workbench src/Main/Base/Services

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat Mar 6 11:17:38 EST 2004


Author: martin
Date: 2004-03-06 11:17:38 -0500 (Sat, 06 Mar 2004)
New Revision: 1125

Modified:
   trunk/MonoDevelop/ChangeLog
   trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
   trunk/MonoDevelop/configure.in
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/Pads/DebuggerVariablePad.cs
   trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
   trunk/MonoDevelop/src/Main/Base/Makefile.am
   trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
Log:
2004-03-06  Martin Baulig  <martin at ximian.com>

	* configure.in: AC_SUBST(debugger_prefix).
	* src/Main/Base/Services/Makefile.am: Use full path name for Mono.Debugger.dll.

	* src/Main/Base/Gui/Workbench/DefaultWorkbench.cs: connect to the
	debugger's StoppedEvent.
	* src/AddIns/DisplayBindings/SourceEditor/Gui/Pads/DebuggerVariablePad.cs:
	connect to the debugger's ResumedEvent and StoppedEvent.

	* Main/Base/Commands/DebuggerCommands.cs: added KillApplication
	and hook it to the DebuggingService.
	* build/AddIns/SharpDevelopCore.addin: added menu item to the
	debugging menu to kill the application.	



Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/ChangeLog	2004-03-06 16:17:38 UTC (rev 1125)
@@ -1,3 +1,18 @@
+2004-03-06  Martin Baulig  <martin at ximian.com>
+
+	* configure.in: AC_SUBST(debugger_prefix).
+	* src/Main/Base/Services/Makefile.am: Use full path name for Mono.Debugger.dll.
+
+	* src/Main/Base/Gui/Workbench/DefaultWorkbench.cs: connect to the
+	debugger's StoppedEvent.
+	* src/AddIns/DisplayBindings/SourceEditor/Gui/Pads/DebuggerVariablePad.cs:
+	connect to the debugger's ResumedEvent and StoppedEvent.
+
+	* Main/Base/Commands/DebuggerCommands.cs: added KillApplication
+	and hook it to the DebuggingService.
+	* build/AddIns/SharpDevelopCore.addin: added menu item to the
+	debugging menu to kill the application.	
+
 2004-03-05  John BouAntoun  <jba-mono at optusnet.com.au>
 	
 	* src/Main/Base/Gui/Components/OpenFileTab.cs : deleted (duplicates TabLabel)

Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin	2004-03-06 16:17:38 UTC (rev 1125)
@@ -800,6 +800,10 @@
 			          shortcut = "Control|F8"
 				  class = "MonoDevelop.Commands.ToggleRunning"/>
 
+			<MenuItem id = "DebugKillApplication"
+				  label = "Kill Application"
+				  class = "MonoDevelop.Commands.KillApplication"/>
+
 			<MenuItem id = "DebugSep1" label = "-" />
 
 			<MenuItem id = "DebugStepOver"

Modified: trunk/MonoDevelop/configure.in
===================================================================
--- trunk/MonoDevelop/configure.in	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/configure.in	2004-03-06 16:17:38 UTC (rev 1125)
@@ -59,6 +59,8 @@
 dnl find mono debugger
 MONO_DEBUGGER_REQUIRED_VERSION=0.6
 PKG_CHECK_MODULES(MONO_DEBUGGER, mono-debugger >= $MONO_DEBUGGER_REQUIRED_VERSION)
+debugger_prefix=`pkg-config --variable=prefix mono-debugger`
+AC_SUBST(debugger_prefix)
 
 MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`"
 AC_SUBST(MOZILLA_HOME)

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/Pads/DebuggerVariablePad.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/Pads/DebuggerVariablePad.cs	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/Pads/DebuggerVariablePad.cs	2004-03-06 16:17:38 UTC (rev 1125)
@@ -71,6 +71,8 @@
 
 			DebuggingService dbgr = (DebuggingService)ServiceManager.Services.GetService (typeof (DebuggingService));
 			dbgr.PausedEvent += new EventHandler (OnPausedEvent);
+			dbgr.ResumedEvent += new EventHandler (OnResumedEvent);
+			dbgr.StoppedEvent += new EventHandler (OnStoppedEvent);
 		}
 
 		bool add_array (TreeIter parent, ITargetArrayObject array)
@@ -236,11 +238,16 @@
 
 		Hashtable iters = null;
 
-		public void UpdateDisplay ()
+		public void CleanDisplay ()
 		{
 			store.Clear ();
 			iters = new Hashtable ();
+		}
 
+		public void UpdateDisplay ()
+		{
+			CleanDisplay ();
+
 			if ((current_frame == null) || (current_frame.Method == null))
 				return;
 
@@ -261,6 +268,16 @@
 			}
 		}
 
+		protected void OnStoppedEvent (object o, EventArgs args)
+		{
+			CleanDisplay ();
+		}
+
+		protected void OnResumedEvent (object o, EventArgs args)
+		{
+			CleanDisplay ();
+		}
+
 		protected void OnPausedEvent (object o, EventArgs args)
 		{
 			DebuggingService dbgr = (DebuggingService)ServiceManager.Services.GetService (typeof (DebuggingService));

Modified: trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs	2004-03-06 16:17:38 UTC (rev 1125)
@@ -21,6 +21,16 @@
 		}
 	}
 
+	public class KillApplication : AbstractMenuCommand
+	{
+		public override void Run ()
+		{
+			DebuggingService dbgr = (DebuggingService)ServiceManager.Services.GetService (typeof (DebuggingService));
+
+			dbgr.Stop ();
+		}
+	}
+
 	public class StepOver : AbstractMenuCommand
 	{
 		public override void Run ()

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Workbench/DefaultWorkbench.cs	2004-03-06 16:17:38 UTC (rev 1125)
@@ -157,6 +157,7 @@
 			DebuggingService dbgr = (DebuggingService)ServiceManager.Services.GetService (typeof (DebuggingService));
 			dbgr.PausedEvent += new EventHandler (onDebuggerPaused);
 			dbgr.ResumedEvent += new EventHandler (onDebuggerResumed);		
+			dbgr.StoppedEvent += new EventHandler (onDebuggerStopped);		
 		}
 
 		void onDebuggerPaused (object o, EventArgs e)
@@ -180,6 +181,16 @@
 				}
 			}	
 		}
+
+		void onDebuggerStopped (object o, EventArgs e)
+		{
+			foreach (IViewContent content in ViewContentCollection) {
+				if (content.ContentName != null && content.ContentName == cur_dbgFilename) {
+					((IDebuggableEditor)content).ClearExecutingAt (cur_dbgLineNumber);
+					break;
+				}
+			}	
+		}
 		
 		public void InitializeWorkspace()
 		{

Modified: trunk/MonoDevelop/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile.am	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/src/Main/Base/Makefile.am	2004-03-06 16:17:38 UTC (rev 1125)
@@ -371,7 +371,7 @@
 		/r:../../../build/bin/gtkmozembed-sharp.dll \
 		/r:glade-sharp \
 		/r:gnome-sharp \
-		/r:Mono.Debugger \
+		/r:$(debugger_prefix)/lib/Mono.Debugger.dll \
 		$(FILES) \
 	&& cp $(DLL) ../../../build/bin/.
 

Modified: trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-06 15:37:55 UTC (rev 1124)
+++ trunk/MonoDevelop/src/Main/Base/Services/DebuggingService.cs	2004-03-06 16:17:38 UTC (rev 1125)
@@ -229,12 +229,7 @@
 
 		public void Stop ()
 		{
-			if (!Debugging)
-				return;
-
-			proc.Kill ();
-			proc = null;
-			backend = null;
+			Cleanup ();
 		}
 
 		public void StepInto ()




More information about the Monodevelop-patches-list mailing list