public static IAsyncOperation DebugApplication(this ProjectOperations opers, string executableFile)
        {
            if (opers.CurrentRunOperation != null && !opers.CurrentRunOperation.IsCompleted)
            {
                return(opers.CurrentRunOperation);
            }

            string oldLayout = IdeApp.Workbench.CurrentLayout;

            IdeApp.Workbench.CurrentLayout = "Debug";

            IProgressMonitor monitor = IdeApp.Workbench.ProgressMonitors.GetRunProgressMonitor();

            IAsyncOperation oper = DebuggingService.Run(executableFile, (IConsole)monitor);

            oper.Completed += delegate
            {
                monitor.Dispose();
                Gtk.Application.Invoke(delegate
                {
                    IdeApp.Workbench.CurrentLayout = oldLayout;
                });
            };

            opers.CurrentRunOperation = monitor.AsyncOperation;
            return(opers.CurrentRunOperation);
        }
 public ProcessAsyncOperation Execute(ExecutionCommand command, OperationConsole console)
 {
     if (!CanExecute(command))
     {
         return(null);
     }
     return(DebuggingService.Run(command, console));
 }
Esempio n. 3
0
        public static AsyncOperation DebugApplication(this ProjectOperations opers, string executableFile, string args, string workingDir, IDictionary <string, string> envVars)
        {
            var monitor = IdeApp.Workbench.ProgressMonitors.GetRunProgressMonitor(System.IO.Path.GetFileName(executableFile));

            var oper = DebuggingService.Run(executableFile, args, workingDir, envVars, monitor.Console);

            opers.AddRunOperation(oper);

            oper.Task.ContinueWith(t => {
                monitor.Dispose();
            });

            return(oper);
        }
Esempio n. 4
0
        public static IAsyncOperation DebugApplication(this ProjectOperations opers, string executableFile, string args, string workingDir, IDictionary <string, string> envVars)
        {
            if (opers.CurrentRunOperation != null && !opers.CurrentRunOperation.IsCompleted)
            {
                return(opers.CurrentRunOperation);
            }

            var monitor = IdeApp.Workbench.ProgressMonitors.GetRunProgressMonitor();

            var oper = DebuggingService.Run(executableFile, args, workingDir, envVars, (IConsole)monitor);

            oper.Completed += delegate {
                monitor.Dispose();
            };

            opers.CurrentRunOperation = monitor.AsyncOperation;
            return(opers.CurrentRunOperation);
        }
Esempio n. 5
0
 public ProcessAsyncOperation Execute(ExecutionCommand command, OperationConsole console)
 {
     return(DebuggingService.Run(command, console, engine));
 }
 public IProcessAsyncOperation Execute(string command, string arguments, string workingDirectory, IConsole console)
 {
     service.Run(console, new string[] { command });
     return(this);
 }