/// <summary> /// Add a line to the list view of the output window and parse it with the /// output line parser provided. /// </summary> /// <param name="line">The text to add.</param> /// <param name="parser">A line parser.</param> /// <param name="foreColor">The colour used to display the text.</param> public void AddLineToListView( string line, IOutputLineParser parser, Color foreColor) { line = CleanUpLine(line); if (String.IsNullOrEmpty(line)) { return; } ListViewItem lvi = new ListViewItem(line); lvi.ForeColor = foreColor; ParsedLine parsedLine = null; if (parser == null) { lvi.Tag = null; } else { parsedLine = parser.Parse(line); lvi.Tag = parsedLine; } if (parsedLine != null && parsedLine.IsError) { lvi.ImageKey = Constants.ERROR_IMAGE; } _listViewListView.Items.Add(lvi); }
/// <summary> /// Register an output line parser with the build tool system. Output line /// parsers are used to extract information from the output of build tools /// such as compilers. They provide file and line number information for /// displaying error messages and locating error lines in the text editor. /// </summary> /// <param name="displayName">The parser's display name.</param> /// <param name="documentType">A document type.</param> /// <param name="action">A build action.</param> /// <param name="parser">the parser.</param> public void RegisterLineParser( string displayName, DocumentType documentType, string action, IOutputLineParser parser) { OutputLineParserListItem p = new OutputLineParserListItem(); p.DisplayName = displayName; p.DocumentType = documentType; p.Action = action; p.Parser = parser; _lineParsers[p.DisplayName] = p; }
public Finder(OutputForm output) { _mainForm = ApplicationManager.GetInstance().MainForm; _outputForm = output; _outputLineParser = new FinderOutputLineParser(); }
/// <summary> /// Add a line to the list view of the output window and parse it with the /// output line parser provided. /// </summary> /// <param name="line">The text to add.</param> /// <param name="parser">A line parser.</param> public void AddLineToListView( string line, IOutputLineParser parser) { AddLineToListView(line, parser, _listViewListView.ForeColor); }
/// <summary> /// Add a line to the output window views and parse it with the /// output line parser provided. /// </summary> /// <param name="line">The text to add.</param> /// <param name="parser">A line parser.</param> public void AddLineToOutputView(string line, IOutputLineParser parser) { AddLineToListView(line, parser); AddLineToTextView(line); }