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; }
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; }
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)); } }
internal NewLineDisplayFactory(IEditorFormatMapService editorFormatMapService, IVsShowCharsOptions options) { _editorFormatMapService = editorFormatMapService; _options = options; }
internal CharDisplayTaggerSourceFactory(IEditorFormatMapService editorFormatMapService, IVsShowCharsOptions options) { _editorFormatMapService = editorFormatMapService; _options = options; }