示例#1
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();
        }
示例#2
0
 public EolAdornedTextView(IWpfTextView view, IAdornmentLayer layer, IEolOptions eolOptions)
 {
     View            = view;
     this.layer      = layer;
     this.eolOptions = eolOptions;
 }
示例#3
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;
        }