ICommandTarget ICommandTargetFactory.CreateCommandTarget(IOleCommandTarget nextCommandTarget, IVimBufferCoordinator vimBufferCoordinator) { if (!_reSharperUtil.IsInstalled) { return(null); } return(ReSharperKeyUtil.GetOrCreate(vimBufferCoordinator)); }
KeyProcessor IKeyProcessorProvider.GetAssociatedProcessor(IWpfTextView wpfTextView) { // Don't want to invoke the custom processor unless R# is installed on the machine if (!_reSharperUtil.IsInstalled) { return(null); } IVimBuffer vimBuffer; if (!_vim.TryGetOrCreateVimBufferForHost(wpfTextView, out vimBuffer)) { return(null); } var vimBufferCoordinator = _vimBufferCoordinatorFactory.GetVimBufferCoordinator(vimBuffer); return(ReSharperKeyUtil.GetOrCreate(vimBufferCoordinator)); }