/// <summary> /// Constructor. /// </summary> /// <param name="textViewAdapter">IVsTextView</param> /// <param name="textView">ITextView</param> /// <param name="provider">Provider</param> internal CompletionCommandHandler(IVsTextView textViewAdapter, ITextView textView, CompletionHandlerProvider provider) { this.TextView = textView; this.Provider = provider; //add the command to the command chain textViewAdapter.AddCommandFilter(this, out this.NextCommandHandler); }
/// <summary> /// Constructor. /// </summary> /// <param name="textViewAdapter">IVsTextView</param> /// <param name="textView">ITextView</param> /// <param name="provider">Provider</param> internal CompletionCommandHandler(IVsTextView textViewAdapter, ITextView textView, CompletionHandlerProvider provider) { this.TextView = textView; this.VsTextView = textViewAdapter; this.Provider = provider; // Get the text manager from the service provider var textManager = (IVsTextManager2)this.Provider.ServiceProvider.GetService(typeof(SVsTextManager)); textManager.GetExpansionManager(out this.ExpansionManager); this.ExpansionSession = null; // Add the command to the command chain textViewAdapter.AddCommandFilter(this, out this.NextCommandHandler); }