Author: bmotmans
Date: 2007-07-02 08:28:24 -0400 (Mon, 02 Jul 2007)
New Revision: 81175

Modified:
   trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
   
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/IProcessAsyncOperation.cs
   
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessWrapper.cs
   trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
   
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
Log:
2007-07-02  Ben Motmans <[EMAIL PROTECTED]>

        * 
Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessWrapper.cs,
        
Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/IProcessAsyncOperation.cs:
        Added ProcessId property
        
        * Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs:
        Added overloads for Execute and ExecuteFile with ExecutionContext 
parameter


Modified: trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog       2007-07-02 
12:06:22 UTC (rev 81174)
+++ trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog       2007-07-02 
12:28:24 UTC (rev 81175)
@@ -1,3 +1,9 @@
+2007-07-02  Ben Motmans <[EMAIL PROTECTED]>
+
+       * MonoDevelop.Core.Execution/ProcessWrapper.cs,
+       MonoDevelop.Core.Execution/IProcessAsyncOperation.cs:
+       Added ProcessId property
+
 2007-06-21  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Core.Execution/ProcessService.cs: Added new overload for

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/IProcessAsyncOperation.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/IProcessAsyncOperation.cs
    2007-07-02 12:06:22 UTC (rev 81174)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/IProcessAsyncOperation.cs
    2007-07-02 12:28:24 UTC (rev 81175)
@@ -34,5 +34,7 @@
        public interface IProcessAsyncOperation: IAsyncOperation
        {
                int ExitCode { get; }
+               
+               int ProcessId { get; }
        }
 }

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessWrapper.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessWrapper.cs
    2007-07-02 12:06:22 UTC (rev 81174)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core.Execution/ProcessWrapper.cs
    2007-07-02 12:28:24 UTC (rev 81175)
@@ -73,6 +73,10 @@
                        get { return ExitCode; }
                }
                
+               int IProcessAsyncOperation.ProcessId {
+                       get { return Id; }
+               }
+               
                void IAsyncOperation.Cancel ()
                {
                        try {

Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2007-07-02 
12:06:22 UTC (rev 81174)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2007-07-02 
12:28:24 UTC (rev 81175)
@@ -1,3 +1,8 @@
+2007-07-02  Ben Motmans <[EMAIL PROTECTED]>
+
+       * MonoDevelop.Ide.Gui/ProjectOperations.cs:
+       Added overloads for Execute and ExecuteFile with ExecutionContext 
parameter
+
 2007-06-30  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Ide.Gui.Dialogs/SelectReferenceDialog.cs,

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
 2007-07-02 12:06:22 UTC (rev 81174)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ProjectOperations.cs
 2007-07-02 12:28:24 UTC (rev 81175)
@@ -898,10 +898,15 @@
                
                public IAsyncOperation Execute (CombineEntry entry)
                {
+                       ExecutionContext context = new ExecutionContext (new 
DefaultExecutionHandlerFactory (), IdeApp.Workbench.ProgressMonitors);
+                       return Execute (entry, context);
+               }
+               
+               public IAsyncOperation Execute (CombineEntry entry, 
ExecutionContext context)
+               {
                        if (currentRunOperation != null && 
!currentRunOperation.IsCompleted) return currentRunOperation;
 
                        IProgressMonitor monitor = new 
MessageDialogProgressMonitor ();
-                       ExecutionContext context = new ExecutionContext (new 
DefaultExecutionHandlerFactory (), IdeApp.Workbench.ProgressMonitors);
 
                        Services.DispatchService.ThreadDispatch (new 
StatefulMessageHandler (ExecuteCombineEntryAsync), new object[] {entry, 
monitor, context});
                        currentRunOperation = monitor.AsyncOperation;
@@ -1037,6 +1042,21 @@
                        }
                }
                
+               public IAsyncOperation ExecuteFile (string file, 
ExecutionContext context)
+               {
+                       Project tempProject = 
projectService.CreateSingleFileProject (file);
+                       if (tempProject != null) {
+                               IAsyncOperation aop = Execute (tempProject, 
context);
+                               ProjectOperationHandler h = new 
ProjectOperationHandler ();
+                               h.Project = tempProject;
+                               aop.Completed += new OperationHandler (h.Run);
+                               return aop;
+                       } else {
+                               
Services.MessageService.ShowError(GettextCatalog.GetString ("No runnable 
executable found."));
+                               return NullAsyncOperation.Failure;
+                       }
+               }
+               
                public IAsyncOperation Rebuild (CombineEntry entry)
                {
                        if (currentBuildOperation != null && 
!currentBuildOperation.IsCompleted) return currentBuildOperation;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to