Exemplo n.º 1
0
        internal NewLineDisplay(IWpfTextView textView, IAdornmentLayer adornmentLayer, IEditorFormatMap editorFormatMap, IVsShowCharsOptions options)
        {
            _wpfTextView     = textView;
            _adornmentLayer  = adornmentLayer;
            _options         = options;
            _editorFormatMap = editorFormatMap;

            _wpfTextView.Closed        += OnClosed;
            _wpfTextView.LayoutChanged += OnLayoutChanged;
            _options.Changed           += OnOptionsChanged;
        }
Exemplo n.º 2
0
        internal CharDisplayTaggerSource(ITextView textView, IEditorFormatMap editorFormatMap, IVsShowCharsOptions options)
        {
            _textView        = textView;
            _editorFormatMap = editorFormatMap;
            _options         = options;
            _options         = options;
            UpdateBrushes();

            _textView.TextBuffer.Changed          += OnTextBufferChanged;
            _editorFormatMap.FormatMappingChanged += OnFormatMappingChanged;
            _options.Changed += OnOptionsChanged;
        }
Exemplo n.º 3
0
        protected override void Initialize()
        {
            base.Initialize();

            var componentModel = (IComponentModel)GetService(typeof(SComponentModel));
            var exportProvider = componentModel.DefaultExportProvider;

            _options = exportProvider.GetExportedValue <IVsShowCharsOptions>();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            var mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (mcs != null)
            {
                // Create the command for the menu item.
                var viewControlCharsId = new CommandID(Constants.VsShowCharsCommandSetGuid, CommandList.ViewControlChars);
                var viewNewLinesId     = new CommandID(Constants.VsShowCharsCommandSetGuid, CommandList.ViewNewLines);
                mcs.AddCommand(new MenuCommand(OnViewControlCharsClick, viewControlCharsId));
                mcs.AddCommand(new MenuCommand(OnViewNewLinesClick, viewNewLinesId));
            }
        }
Exemplo n.º 4
0
 internal NewLineDisplayFactory(IEditorFormatMapService editorFormatMapService, IVsShowCharsOptions options)
 {
     _editorFormatMapService = editorFormatMapService;
     _options = options;
 }
Exemplo n.º 5
0
 internal CharDisplayTaggerSourceFactory(IEditorFormatMapService editorFormatMapService, IVsShowCharsOptions options)
 {
     _editorFormatMapService = editorFormatMapService;
     _options = options;
 }