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; }
private EolAdornment(IEditorOptions editorOptions, IEditorFormatMapService formatMapService, EolAdornedTextView textView, IEolOptions eolOptions) { adornedTextView = textView; this.eolOptions = eolOptions; this.editorOptions = editorOptions; this.editorOptions.OptionChanged += OnEditorOptionChanged; this.eolOptions.OptionChanged += OnEolOptionChanged; formatMap = formatMapService.GetEditorFormatMap(adornedTextView.View); formatMap.FormatMappingChanged += FormatMapOnFormatMappingChanged; ReadAdornmentBrushSetting(); UpdateAdorningState(); }