void AddCommandFilter(IVsTextView viewAdapter, EditorCommandFilter commandFilter) { //get the view adapter from the editor factory IOleCommandTarget next; int hr = viewAdapter.AddCommandFilter(commandFilter, out next); if (hr == VSConstants.S_OK) { if (next != null) commandFilter.SetNextTarget(next); } }
void AddCommandFilter(IVsTextView viewAdapter, EditorCommandFilter commandFilter) { //get the view adapter from the editor factory IOleCommandTarget next; int hr = viewAdapter.AddCommandFilter(commandFilter, out next); if (hr == VSConstants.S_OK) { if (next != null) { commandFilter.SetNextTarget(next); } } }