internal static void Attach(IWpfTextView view, IEditorOptions options, IEditorFormatMapService formatMapService, IEolOptions eolOptions) { var textView = new EolAdornedTextView(view, view.GetAdornmentLayer("EolAdornment"), eolOptions); var adornment = new EolAdornment(options, formatMapService, textView, eolOptions); view.Closed += adornment.OnClosed; }
/// <summary> /// Piggybacks an EolAdornment manager on top of a text view that has been /// created in order to provide end of line markers for that views. /// </summary> /// <param name="textView"> /// The <see cref="IWpfTextView" /> to adorn with end of /// line markers. /// </param> public void TextViewCreated(IWpfTextView textView) { var options = EditorOptionsFactoryService.GetOptions(textView); EolAdornment.Attach(textView, options, FormatMapService, EolOptions); }