[Monodevelop-patches-list] r553 - trunk/MonoDevelop/src/Main/Base/Commands

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 18 16:49:51 EST 2004


Author: benm
Date: 2004-01-18 16:49:51 -0500 (Sun, 18 Jan 2004)
New Revision: 553

Modified:
   trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs
Log:
no threads here, we must fix this

Modified: trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs	2004-01-18 21:28:13 UTC (rev 552)
+++ trunk/MonoDevelop/src/Main/Base/Commands/RunCommands.cs	2004-01-18 21:49:51 UTC (rev 553)
@@ -3,7 +3,13 @@
 //     <license see="prj:///doc/license.txt"/>
 //     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
 //     <version value="$version"/>
-// </file>
+// </file>
+
+//
+//
+// FIX ME
+// We need to do the compile in the background
+//
 
 using System;
 using System.IO;
@@ -48,7 +54,7 @@
 		
 		void CompileThread()
 		{
-			lock (Compile.CompileLockObject) {
+			//lock (Compile.CompileLockObject) {
 				CombineEntry.BuildProjects = 0;
 				CombineEntry.BuildErrors   = 0;
 				
@@ -93,7 +99,7 @@
 					messageService.ShowError(e, "Error while compiling");
 				}
 				projectService.OnEndBuild();
-			}
+			//}
 		}
 		
 		public void RunWithWait()
@@ -109,7 +115,8 @@
 				
 				if (projectService.CurrentOpenCombine != null) {
 					taskService.CompilerOutput = String.Empty;
-					projectService.OnStartBuild();
+					projectService.OnStartBuild();
+					RunWithWait();
 					//Thread t = new Thread(new ThreadStart(CompileThread));
 					//t.IsBackground  = true;
 					//t.Start();
@@ -175,14 +182,15 @@
 //			if (Monitor.TryEnter(Compile.CompileLockObject)) {
 				TaskService taskService = (TaskService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(TaskService));
 				IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
-//				if (projectService.CurrentOpenCombine != null) {
+				if (projectService.CurrentOpenCombine != null) {
 	
 					taskService.CompilerOutput = String.Empty;
-					projectService.OnStartBuild();
+					projectService.OnStartBuild();
+					CompileThread ();
 					//Thread t = new Thread(new ThreadStart(CompileThread));
 					//t.IsBackground  = true;
 					//t.Start();
-//				}
+				}
 //				Monitor.Exit(Compile.CompileLockObject);
 //			}
 		}
@@ -238,9 +246,10 @@
 		
 		public override void Run()
 		{
-			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
+			IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 			if (projectService.CurrentOpenCombine != null) {
-				RunThread(); // TODO FIXME PEDRO
+				RunThread(); // TODO FIXME PEDRO
+				
 				//Thread t = new Thread(new ThreadStart(RunThread));
 				//t.IsBackground  = true;
 				//t.Start();




More information about the Monodevelop-patches-list mailing list