public void VsTextViewCreated(IVsTextView textViewAdapter) { IWpfTextView textView = EditorAdaptersFactoryService.GetWpfTextView(textViewAdapter); Guid langServiceGuid = GetLanguageServiceGuid(textView); TextManager = (IVsTextManager6)_globalServiceProvider.GetService(typeof(SVsTextManager)); HotSettingsCommandFilter commandFilter = new HotSettingsCommandFilter(textView, langServiceGuid, TextManager); textViewAdapter.AddCommandFilter(commandFilter, out IOleCommandTarget next); commandFilter.Next = next; }
public HotSettingsCommandFilter(IWpfTextView textView, Guid languageServiceGuid, IVsTextManager6 textManager) { this.textView = textView; this.languageServiceGuid = languageServiceGuid; TextManager = textManager; }