コード例 #1
0
ファイル: EolAdornment.cs プロジェクト: marklam/endoftheline
        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;
        }
コード例 #2
0
ファイル: EolAdornment.cs プロジェクト: marklam/endoftheline
        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();
        }