Exemple #1
0
        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;
        }
Exemple #2
0
        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();
        }