Exemplo n.º 1
0
        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);
                    }
                };
            }
        }
Exemplo n.º 2
0
        protected override void Run(object dataItem)
        {
            IExecutionHandler h = ExecutionModeCommandService.GetExecutionModeForCommand(dataItem);

            if (h != null)
            {
                RunHandler.RunMethod(h);
            }
        }
Exemplo n.º 3
0
        protected void OnRunTest(object data)
        {
            IExecutionHandler h = ExecutionModeCommandService.GetExecutionModeForCommand(data);

            if (h != null)
            {
                RunSelectedTest(h);
            }
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
                }
            };
        }