// This handles adding and removing things from the error list private void OnXamlDocParsed(object sender, RapidXamlParsingEventArgs e) { var visibleErrors = RapidXamlDocumentCache.ErrorListTags(this.file); var projectName = this.GetProjectName(this.file); var result = new FileErrorCollection { Project = projectName, FilePath = this.file }; foreach (var viewTag in visibleErrors) { result.Errors.Add(viewTag.AsErrorRow()); } ErrorListService.Process(result); // As the tags that are shown in the error list might have changed, trigger that to be updated too. if (e != null) { var span = new SnapshotSpan(e.Snapshot, 0, e.Snapshot.Length); this.TagsChanged?.Invoke(this, new SnapshotSpanEventArgs(span)); } }
public static void Process(FileErrorCollection result) { TableDataSource.Instance.CleanErrors(result.FilePath); TableDataSource.Instance.AddErrors(result); }