private void LoadErrors(IEnumerable <CompilationError> errors) { _syntaxEditor.Document.SpanIndicatorLayers.Clear(); if (errors != null) { SpanIndicatorLayer spanIndicatorLayer = new SpanIndicatorLayer(null, 0); _syntaxEditor.Document.SpanIndicatorLayers.Add(spanIndicatorLayer); foreach (CompilationError error in errors) { if (error.SourceRange != SourceRange.None) { TextRange textRange = GetTextRange(error.SourceRange); SpanIndicator[] existingIndicators = spanIndicatorLayer.GetIndicatorsForTextRange(textRange); if (existingIndicators.Length == 0) { SyntaxErrorSpanIndicator errorIndicator = new SyntaxErrorSpanIndicator(); errorIndicator.Tag = error; spanIndicatorLayer.Add(errorIndicator, textRange); } } } } }
private void LoadErrors(IEnumerable<CompilationError> errors) { _syntaxEditor.Document.SpanIndicatorLayers.Clear(); if (errors != null) { SpanIndicatorLayer spanIndicatorLayer = new SpanIndicatorLayer(null, 0); _syntaxEditor.Document.SpanIndicatorLayers.Add(spanIndicatorLayer); foreach (CompilationError error in errors) { if (error.SourceRange != SourceRange.None) { TextRange textRange = GetTextRange(error.SourceRange); SpanIndicator[] existingIndicators = spanIndicatorLayer.GetIndicatorsForTextRange(textRange); if (existingIndicators.Length == 0) { SyntaxErrorSpanIndicator errorIndicator = new SyntaxErrorSpanIndicator(); errorIndicator.Tag = error; spanIndicatorLayer.Add(errorIndicator, textRange); } } } } }