protected override void Run(object dataItem) { IExecutionHandler h = ExecutionModeCommandService.GetExecutionModeForCommand(dataItem); IBuildTarget target = IdeApp.ProjectOperations.CurrentSelectedBuildTarget; if (h == null || !IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) { return; } if (!IdeApp.Preferences.BuildBeforeExecuting) { IdeApp.ProjectOperations.Execute(target, h); } else { IAsyncOperation asyncOperation = IdeApp.ProjectOperations.Build(target); asyncOperation.Completed += delegate { if ((asyncOperation.Success) || (IdeApp.Preferences.RunWithWarnings && asyncOperation.SuccessWithWarnings)) { IdeApp.ProjectOperations.Execute(target, h); } }; } }
protected override void Run(object dataItem) { IExecutionHandler h = ExecutionModeCommandService.GetExecutionModeForCommand(dataItem); if (h != null) { RunHandler.RunMethod(h); } }
protected void OnRunTest(object data) { IExecutionHandler h = ExecutionModeCommandService.GetExecutionModeForCommand(data); if (h != null) { RunSelectedTest(h); } }
protected override void Run(object dataItem) { IExecutionHandler h = ExecutionModeCommandService.GetExecutionModeForCommand(dataItem); IBuildTarget target = IdeApp.ProjectOperations.CurrentSelectedBuildTarget; if (h == null || !IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) { return; } IdeApp.ProjectOperations.Execute(target, h); }
protected override void Run(object dataItem) { IExecutionHandler h = ExecutionModeCommandService.GetExecutionModeForCommand(dataItem); IBuildTarget target = IdeApp.ProjectOperations.CurrentSelectedBuildTarget; if (h == null || !IdeApp.ProjectOperations.CurrentRunOperation.IsCompleted) { return; } var op = IdeApp.ProjectOperations.CheckAndBuildForExecute(target); op.Completed += delegate { if (op.Success) { IdeApp.ProjectOperations.Execute(target, h); } }; }