public TextMarker([NotNull] ErrorTextMarkerService service, int startOffset, int length) { _service = service; StartOffset = startOffset; Length = length; _markerTypes = TextMarkerTypes.None; }
public static ErrorTextMarkerService RegisterErrorTextMarkerService(TextEditor textEditor) { var textMarkerService = new ErrorTextMarkerService(textEditor); textEditor.TextArea.TextView.BackgroundRenderers.Add(textMarkerService); textEditor.TextArea.TextView.LineTransformers.Add(textMarkerService); var services = (IServiceContainer)textEditor.Document.ServiceProvider.GetService(typeof(IServiceContainer)); services?.AddService(typeof(ErrorTextMarkerService), textMarkerService); return(textMarkerService); }