[Monodevelop-patches-list] r2689 - trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn

Lluis Sanchez <lluis@ximian.com> lluis at mono-cvs.ximian.com
Wed Jul 27 10:55:15 EDT 2005


Author: lluis
Date: 2005-07-27 10:55:15 -0400 (Wed, 27 Jul 2005)
New Revision: 2689

Modified:
   trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/DebuggingService.cs
   trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Makefile.am
Log:
2005-07-27  Lluis Sanchez Gual  <lluis at novell.com> 

	* DebuggingService.cs: Use the new IConsole parameter to write the
	output.



Modified: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog	2005-07-27 14:54:34 UTC (rev 2688)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/ChangeLog	2005-07-27 14:55:15 UTC (rev 2689)
@@ -1,3 +1,8 @@
+2005-07-27  Lluis Sanchez Gual  <lluis at novell.com> 
+
+	* DebuggingService.cs: Use the new IConsole parameter to write the
+	output.
+
 2005-06-28  Raja R Harinath  <rharinath at novell.com>
 
 	* Makefile.am (DebuggerPaths.cs): Fix for srcdir != builddir.

Modified: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/DebuggingService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/DebuggingService.cs	2005-07-27 14:54:34 UTC (rev 2688)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/DebuggingService.cs	2005-07-27 14:55:15 UTC (rev 2689)
@@ -30,6 +30,7 @@
 		Hashtable procs = new Hashtable ();
 		Hashtable breakpoints = new Hashtable ();
 		DebuggerBackend backend;
+		IConsole console;
 
 		IProgressMonitor current_monitor;
 
@@ -53,8 +54,8 @@
 
 			backend.Dispose ();
 			backend = null;
-			current_monitor.Dispose ();
-			current_monitor = null;
+			console.Dispose ();
+			console = null;
 #if NET_2_0
 			attr_handler = null;
 #endif
@@ -78,16 +79,6 @@
 		}
 #endif
 
-		public void CreateDebugConsole ()
-		{
-			if (current_monitor != null)
-				return;
-
-			current_monitor = Runtime.TaskService.GetOutputProgressMonitor ("Debug Output",
-								MonoDevelop.Gui.Stock.OutputIcon,
-								true, true);
-		}
-
 		public bool IsDebugging {
 			get {
 				return backend != null && proc != null && proc.HasTarget;
@@ -247,19 +238,20 @@
 		void target_output (bool is_stderr, string line)
 		{
 			Console.WriteLine (line);
-			current_monitor.Log.Write (line);
+			console.Out.Write (line);
 		}
 
 		void debugger_output (string line)
 		{
 			Console.WriteLine (line);
-			current_monitor.ReportWarning (line);
+			console.Out.Write (line);
 		}
 
 		void debugger_error (object sender, string message, Exception e)
 		{
-		  Console.WriteLine (message);
-			current_monitor.ReportError (message, e);
+			Console.WriteLine (message);
+			console.Error.Write (message);
+			console.Error.Write (e.ToString ());
 		}
 
 		private void target_event (object sender, TargetEventArgs args)
@@ -362,7 +354,7 @@
 			proc.Continue (false);
 		}
 
-		public void Run (IProgressMonitor monitor, string[] argv)
+		public void Run (IConsole console, string[] argv)
 		{
 			if (IsDebugging)
 				return;
@@ -370,7 +362,7 @@
 #if NET_2_0
 			AttributeHandler.Rescan();
 #endif
-			CreateDebugConsole ();
+			this.console = console;
 
 			backend = new DebuggerBackend ();
 			backend.ThreadManager.InitializedEvent += new ThreadEventHandler (initialized_event);
@@ -378,10 +370,10 @@
 			backend.ThreadManager.ThreadExitedEvent += new ThreadEventHandler (thread_exited);
 			backend.Run (new ProcessStart (null, argv));
 			
-			monitor.CancelRequested += new MonitorHandler (OnCancelRequested);
+			console.CancelRequested += new EventHandler (OnCancelRequested);
 		}
 		
-		void OnCancelRequested (IProgressMonitor monitor)
+		void OnCancelRequested (object sender, EventArgs args)
 		{
 			Stop ();
 		}

Modified: trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Makefile.am
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Makefile.am	2005-07-27 14:54:34 UTC (rev 2688)
+++ trunk/MonoDevelop/Core/src/AddIns/DebuggerAddIn/Makefile.am	2005-07-27 14:55:15 UTC (rev 2689)
@@ -10,7 +10,6 @@
 	/r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
         /r:$(top_builddir)/build/bin/ICSharpCode.SharpRefactory.dll
 
-
 FILES = \
 DebuggingService.cs \
 EvaluationContext.cs \




More information about the Monodevelop-patches-list mailing list