Example #1
0
        private void extractBuildOutput(bool success)
        {
            try
            {
                for (int i = 1; i <= _application.ToolWindows.OutputWindow.OutputWindowPanes.Count; i++)
                {
                    var pane = _application.ToolWindows.OutputWindow.OutputWindowPanes.Item(i);
                    if (pane.Name == "Build")
                    {
                        pane.TextDocument.Selection.SelectAll();
                        var context = pane.TextDocument.Selection.Text;
                        pane.TextDocument.Selection.EndOfDocument();

                        var parser  = new OutputParser(_application, _timeOfLastOutputParsing);
                        var message = parser.Parse(context);
                        if (message != null && (((message.ErrorsToAdd.Length > 0 || message.WarningsToAdd.Length > 0) && !success) || success))
                        {
                            var projects = parser.GetProjects();
                            foreach (var project in projects)
                            {
                                _clear(project);
                            }
                            _notify(message);
                        }
                        break;
                    }
                }
            }
            catch
            {
            }
            _timeOfLastOutputParsing = DateTime.Now;
        }
        private void extractBuildOutput(bool success)
        {
            try
            {
                for (int i = 1; i <= _application.ToolWindows.OutputWindow.OutputWindowPanes.Count; i++)
                {
                    var pane = _application.ToolWindows.OutputWindow.OutputWindowPanes.Item(i);
                    if (pane.Name == "Build")
                    {
                        pane.TextDocument.Selection.SelectAll();
                        var context = pane.TextDocument.Selection.Text;
                        pane.TextDocument.Selection.EndOfDocument();

                        var parser = new OutputParser(_application, _timeOfLastOutputParsing);
                        var message = parser.Parse(context);
                        if (message != null && (((message.ErrorsToAdd.Length > 0 || message.WarningsToAdd.Length > 0) && !success) || success))
                        {
                            var projects = parser.GetProjects();
                            foreach (var project in projects)
                                _clear(project);
                            _notify(message);
                        }
                        break;
                    }
                }
            }
            catch
            {
            }
            _timeOfLastOutputParsing = DateTime.Now;
        }