public void SetTransformations(SyntaxHighlightDataList highlightData) { Dispatcher.UIThread.InvokeAsync(() => { var transformations = new TextSegmentCollection <TextTransformation>(document); foreach (var transform in highlightData) { if (transform.Type != HighlightType.None) { transformations.Add(new TextTransformation { Foreground = GetBrush(transform.Type), StartOffset = transform.Start, EndOffset = transform.Start + transform.Length }); } } TextTransformations = transformations; if (DataChanged != null) { DataChanged(this, new EventArgs()); } }); }
public DiagnosticsUpdatedEventArgs(object tag, ISourceFile associatedFile, DiagnosticsUpdatedKind kind, ImmutableArray <Diagnostic> diagnostics, SyntaxHighlightDataList diagnosticHighlights = null) { Tag = tag; AssociatedSourceFile = associatedFile; Kind = kind; Diagnostics = diagnostics; DiagnosticHighlights = diagnosticHighlights; }
public DiagnosticsUpdatedEventArgs(object tag, string filePath, DiagnosticsUpdatedKind kind, DiagnosticSourceKind source, ImmutableArray <Diagnostic> diagnostics, SyntaxHighlightDataList diagnosticHighlights = null) { Tag = tag; FilePath = filePath; Kind = kind; Diagnostics = diagnostics; DiagnosticHighlights = diagnosticHighlights; Source = source; }
public void SetTransformations(object tag, SyntaxHighlightDataList highlightData) { foreach (var highlight in highlightData) { if (highlight.Type != HighlightType.None) { TextTransformations.Add(GetTextTransformation(tag, highlight)); } } }
public void SetTransformations(object tag, SyntaxHighlightDataList highlightData) { Dispatcher.UIThread.InvokeAsync(() => { RemoveAll(transform => Equals(transform.Tag, tag)); foreach (var highlight in highlightData) { if (highlight.Type != HighlightType.None) { TextTransformations.Add(GetTextTransformation(tag, highlight)); } } }); }
public void SetTransformations(SyntaxHighlightDataList highlightData) { Dispatcher.UIThread.InvokeAsync(() => { var transformations = new TextSegmentCollection <TextTransformation>(document); foreach (var transform in highlightData) { if (transform.Type != HighlightType.None) { if (transform is LineColumnSyntaxHighlightingData) { var trans = transform as LineColumnSyntaxHighlightingData; transformations.Add(new TextTransformation { Foreground = GetBrush(transform.Type), StartOffset = document.GetOffset(trans.StartLine, trans.StartColumn), EndOffset = document.GetOffset(trans.EndLine, trans.EndColumn) }); } else { transformations.Add(new TextTransformation { Foreground = GetBrush(transform.Type), StartOffset = transform.Start, EndOffset = transform.Start + transform.Length }); } } } TextTransformations = transformations; }); }
public CodeAnalysisResults() { SyntaxHighlightingData = new SyntaxHighlightDataList(); Diagnostics = new TextSegmentCollection <Diagnostic>(); IndexItems = new List <IndexEntry>(); }
public CodeAnalysisResults() { SyntaxHighlightingData = new SyntaxHighlightDataList(); IndexItems = new List <IndexEntry>(); }