public void VsTextViewCreated(IVsTextView textViewAdapter) { var wpfTextView = editorAdaptersFactory.GetWpfTextView(textViewAdapter); // Add an instance of CommandTarget to the view. CommandTarget adds itself to the view's // filter chain to receive and respond to VS commands. var commandTarget = new CommandTarget(textViewAdapter, wpfTextView, serviceProvider); wpfTextView.Properties.AddProperty(typeof(CommandTarget), commandTarget); }