void ShowUnitTestsPad()
        {
            var descriptor = workbench.GetPad(typeof(UnitTestsPad));

            descriptor.BringPadToFront();
            var pad = descriptor.PadContent as UnitTestsPad;

            if (pad != null)
            {
                pad.TreeView.SelectedTests = testsByProject.Values;
            }
        }
        /// <summary>
        /// Displays the output from NAnt after it has exited.
        /// </summary>
        /// <param name="sender">The event source.</param>
        /// <param name="e">The NAnt exit event arguments.</param>
        void NAntExited(object sender, NAntExitEventArgs e)
        {
            // Update output window.
            string outputText = String.Empty;

            System.Diagnostics.Debug.Assert(e.Error.Length == 0);

            outputText = String.Concat(outputText, e.Output);

            // Update task list.
            TaskCollection tasks = NAntOutputParser.Parse(outputText);

            foreach (Task task in tasks)
            {
                WorkbenchSingleton.SafeThreadAsyncCall(TaskService.Add, task);
            }

            // Bring task list to front.
            if (tasks.Count > 0 && ErrorListPad.ShowAfterBuild)
            {
                IWorkbench    workbench     = ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.Workbench;
                PadDescriptor padDescriptor = workbench.GetPad(typeof(ErrorListPad));
                if (padDescriptor != null)
                {
                    WorkbenchSingleton.SafeThreadAsyncCall(padDescriptor.BringPadToFront);
                }
            }
        }
        /// <summary>
        /// Gets any extra arguments from the NAnt pad's text box.
        /// </summary>
        protected string GetPadTextBoxArguments()
        {
            string arguments = String.Empty;

            IWorkbench    Workbench     = ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.Workbench;
            PadDescriptor padDescriptor = Workbench.GetPad(typeof(NAntPadContent));

            if (padDescriptor != null && padDescriptor.PadContent != null)
            {
                arguments = ((NAntPadContent)padDescriptor.PadContent).Arguments;
            }

            return(arguments);
        }
        public override void Run()
        {
            IWorkbench    workbench       = WorkbenchSingleton.Workbench;
            PadDescriptor setupDialogsPad = workbench.GetPad(typeof(SetupDialogListPad));

            if (setupDialogsPad != null)
            {
                setupDialogsPad.BringPadToFront();
            }
            else
            {
                foreach (PadDescriptor pad in workbench.PadContentCollection)
                {
                    if (pad.PadContent is SetupDialogListPad)
                    {
                        workbench.ShowPad(pad);
                        break;
                    }
                }
            }
        }
Esempio n. 5
0
        public IScriptingConsolePad GetScriptingConsolePad()
        {
            PadDescriptor padDescriptor = workbench.GetPad(consolePadType);

            return(padDescriptor.PadContent as IScriptingConsolePad);
        }