private void AddCommandFilter(IVsTextView viewAdapter, MultiPointEditCommandFilter commandFilter) { if (commandFilter.Added == false) { IOleCommandTarget next; int result = viewAdapter.AddCommandFilter(commandFilter, out next); if (result == VSConstants.S_OK) { commandFilter.Added = true; if (next != null) { commandFilter.NextTarget = next; } } } }
private void AddCommandFilter(IVsTextView viewAdapter, IWpfTextView textView, MultiPointEditCommandFilter commandFilter) { if (commandFilter.Added == false) { IOleCommandTarget next; int result = viewAdapter.AddCommandFilter(commandFilter, out next); if (result == VSConstants.S_OK) { commandFilter.Added = true; textView.Properties.AddProperty(typeof(MultiPointEditCommandFilter), commandFilter); if (next != null) { commandFilter.NextTarget = next; } } } }