[Monodevelop-patches-list] r1471 - trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Fri Apr 16 17:58:20 EDT 2004


Author: jluke
Date: 2004-04-16 17:58:20 -0400 (Fri, 16 Apr 2004)
New Revision: 1471

Modified:
   trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs
Log:
add status and progress thanks to tokugawa


Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs	2004-04-16 21:05:03 UTC (rev 1470)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/JavaBinding/JavaBindingCompilerServices.cs	2004-04-16 21:58:20 UTC (rev 1471)
@@ -10,6 +10,8 @@
 using System.IO;
 using System.CodeDom.Compiler;
 
+using MonoDevelop.Gui.Components;
+using MonoDevelop.Services;
 using MonoDevelop.Core.Services;
 using MonoDevelop.Internal.Project;
 
@@ -151,6 +153,21 @@
 			Process p = new Process ();
             p.StartInfo = si;
             p.Start ();
+
+			IStatusBarService sbs = (IStatusBarService)ServiceManager.Services.GetService (typeof (IStatusBarService));
+			sbs.SetMessage ("Compiling...");
+
+			while (!p.HasExited) {
+				((SdStatusBar)sbs.ProgressMonitor).Pulse();
+				while (Gtk.Application.EventsPending ())
+					Gtk.Application.RunIteration ();
+				System.Threading.Thread.Sleep (100);
+			}
+			((SdStatusBar) sbs.ProgressMonitor).Done ();
+		
+			// FIXME: avoid having a full buffer
+			// perhaps read one line and append parsed output
+			// and then return cr at end 
 			output = p.StandardOutput;
 			error = p.StandardError;
             p.WaitForExit ();
@@ -160,13 +177,11 @@
 		{
 			string compilerOutput = "";		
 			StreamReader sr = errorStream;
-			
 			CompilerResults cr = new CompilerResults(tf);
 			
 			while (true) 
 				{
 				string next = sr.ReadLine ();
-				Console.WriteLine (next);
 				
 				if (next == null)
 					break;




More information about the Monodevelop-patches-list mailing list