Beispiel #1
0
        protected async override void Run()
        {
            if (DebuggingService.IsPaused)
            {
                DebuggingService.Resume();
                return;
            }

            if (!IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted)
            {
                if (!MessageService.Confirm(GettextCatalog.GetString("An application is already running. Do you want to stop it?"), AlertButton.Stop))
                {
                    return;
                }
                StopHandler.StopBuildOperations();
                await IdeApp.ProjectOperations.CurrentRunOperation.Task;
            }

            if (IdeApp.Workspace.IsOpen)
            {
                var target = GetRunTarget();
                if (target != null)
                {
                    IdeApp.ProjectOperations.Debug(target);
                }
            }
        }
        protected override void Run()
        {
            if (DebuggingService.IsPaused)
            {
                DebuggingService.Resume();
                return;
            }

            BuildAndDebug();
        }
Beispiel #3
0
        protected override void Run()
        {
            if (DebuggingService.IsPaused)
            {
                DebuggingService.Resume();
                return;
            }

            if (IdeApp.Workspace.IsOpen)
            {
                var target = GetRunTarget();
                if (target != null)
                {
                    IdeApp.ProjectOperations.Debug(target);
                }
            }
        }
Beispiel #4
0
 protected override void Run()
 {
     DebuggingService.Resume();
 }
        protected override void Run()
        {
            if (DebuggingService.IsPaused)
            {
                DebuggingService.Resume();
                return;
            }

            if (!DebuggingService.IsDebuggingSupported && !IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted)
            {
                MonoDevelop.Ide.Commands.StopHandler.StopBuildOperations();
                IdeApp.ProjectOperations.CurrentRunOperation.WaitForCompleted();
            }

            if (!IdeApp.Preferences.BuildBeforeExecuting)
            {
                if (IdeApp.Workspace.IsOpen)
                {
                    CheckResult cr = CheckBeforeDebugging(IdeApp.ProjectOperations.CurrentSelectedSolution);
                    if (cr == DebugHandler.CheckResult.Cancel)
                    {
                        return;
                    }
                    if (cr == DebugHandler.CheckResult.Run)
                    {
                        ExecuteSolution(IdeApp.ProjectOperations.CurrentSelectedSolution);
                        return;
                    }
                    // Else continue building
                }
                else
                {
                    ExecuteDocument(IdeApp.Workbench.ActiveDocument);
                    return;
                }
            }

            if (IdeApp.Workspace.IsOpen)
            {
                Solution        sol = IdeApp.ProjectOperations.CurrentSelectedSolution;
                IAsyncOperation op  = IdeApp.ProjectOperations.Build(sol);
                op.Completed += delegate {
                    if (op.SuccessWithWarnings && !IdeApp.Preferences.RunWithWarnings)
                    {
                        return;
                    }
                    if (op.Success)
                    {
                        ExecuteSolution(sol);
                    }
                };
            }
            else
            {
                Document doc = IdeApp.Workbench.ActiveDocument;
                if (doc != null)
                {
                    doc.Save();
                    IAsyncOperation op = doc.Build();
                    op.Completed += delegate {
                        if (op.SuccessWithWarnings && !IdeApp.Preferences.RunWithWarnings)
                        {
                            return;
                        }
                        if (op.Success)
                        {
                            ExecuteDocument(doc);
                        }
                    };
                }
            }
        }