Exemplo n.º 1
0
        ICommandTarget ICommandTargetFactory.CreateCommandTarget(IOleCommandTarget nextCommandTarget, IVimBufferCoordinator vimBufferCoordinator)
        {
            if (!_reSharperUtil.IsInstalled)
            {
                return(null);
            }

            return(ReSharperKeyUtil.GetOrCreate(vimBufferCoordinator));
        }
Exemplo n.º 2
0
        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));
        }