Пример #1
0
        public HostFactory(
            IVim vim,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IReSharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            [EditorUtilsImport] IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil,
            IEditorToSettingsSynchronizer editorToSettingSynchronizer)
        {
            _vim           = vim;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory             = adaptersFactory;
            _textManager                 = textManager;
            _adapter                     = adapter;
            _protectedOperations         = protectedOperations;
            _bufferCoordinatorFactory    = bufferCoordinatorFactory;
            _keyUtil                     = keyUtil;
            _editorToSettingSynchronizer = editorToSettingSynchronizer;

#if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
#endif
        }
Пример #2
0
        public HostFactory(
            IVim vim,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IReSharperUtil resharperUtil,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            [EditorUtilsImport] IProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil,
            IEditorToSettingsSynchronizer editorToSettingSynchronizer)
        {
            _vim = vim;
            _resharperUtil = resharperUtil;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;
            _editorToSettingSynchronizer = editorToSettingSynchronizer;

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
Пример #3
0
 private VsCommandTarget(
     IVimBufferCoordinator bufferCoordinator,
     ITextManager textManager,
     IVsAdapter vsAdapter,
     IDisplayWindowBroker broker,
     IReSharperUtil resharperUtil,
     IKeyUtil keyUtil)
 {
     _vimBuffer = bufferCoordinator.VimBuffer;
     _vim = _vimBuffer.Vim;
     _bufferCoordinator = bufferCoordinator;
     _textBuffer = _vimBuffer.TextBuffer;
     _textView = _vimBuffer.TextView;
     _textManager = textManager;
     _vsAdapter = vsAdapter;
     _broker = broker;
     _resharperUtil = resharperUtil;
     _keyUtil = keyUtil;
 }
Пример #4
0
 private VsCommandTarget(
     IVimBufferCoordinator bufferCoordinator,
     ITextManager textManager,
     IVsAdapter vsAdapter,
     IDisplayWindowBroker broker,
     IReSharperUtil resharperUtil,
     IKeyUtil keyUtil)
 {
     _vimBuffer         = bufferCoordinator.VimBuffer;
     _vim               = _vimBuffer.Vim;
     _bufferCoordinator = bufferCoordinator;
     _textBuffer        = _vimBuffer.TextBuffer;
     _textView          = _vimBuffer.TextView;
     _textManager       = textManager;
     _vsAdapter         = vsAdapter;
     _broker            = broker;
     _resharperUtil     = resharperUtil;
     _keyUtil           = keyUtil;
 }
Пример #5
0
        internal static Result <VsCommandTarget> Create(
            IVimBufferCoordinator bufferCoordinator,
            IVsTextView vsTextView,
            ITextManager textManager,
            IVsAdapter adapter,
            IDisplayWindowBroker broker,
            IReSharperUtil resharperUtil,
            IKeyUtil keyUtil)
        {
            var vsCommandTarget = new VsCommandTarget(bufferCoordinator, textManager, adapter, broker, resharperUtil, keyUtil);
            var hresult         = vsTextView.AddCommandFilter(vsCommandTarget, out vsCommandTarget._nextTarget);
            var result          = Result.CreateSuccessOrError(vsCommandTarget, hresult);

            if (result.IsSuccess)
            {
                bufferCoordinator.VimBuffer.TextView.Properties[Key] = vsCommandTarget;
            }

            return(result);
        }
Пример #6
0
 internal ReSharperKeyProcessorProvider(IVim vim, IReSharperUtil reSharperUtil, IVimBufferCoordinatorFactory vimBufferCoordinatorFactory)
 {
     _vim = vim;
     _reSharperUtil = reSharperUtil;
     _vimBufferCoordinatorFactory = vimBufferCoordinatorFactory;
 }
Пример #7
0
 internal ReSharperCommandTargetFactory(IReSharperUtil reSharperUtil)
 {
     _reSharperUtil = reSharperUtil;
 }
Пример #8
0
 internal ReSharperExtensionAdapter(IReSharperUtil reSharperUtil, ITextDocumentFactoryService textDocumentFactoryService)
 {
     _reSharperUtil = reSharperUtil;
     _textDocumentFactoryService = textDocumentFactoryService;
 }
Пример #9
0
 internal ReSharperKeyProcessorProvider(IVim vim, IReSharperUtil reSharperUtil, IVimBufferCoordinatorFactory vimBufferCoordinatorFactory)
 {
     _vim           = vim;
     _reSharperUtil = reSharperUtil;
     _vimBufferCoordinatorFactory = vimBufferCoordinatorFactory;
 }
Пример #10
0
 internal ReSharperCommandTargetFactory(IReSharperUtil reSharperUtil)
 {
     _reSharperUtil = reSharperUtil;
 }
Пример #11
0
 internal ReSharperExternalEditAdapter(IReSharperUtil reSharperUtil, IVimBufferCoordinatorFactory vimBufferCoordinatorFactory)
 {
     _reSharperUtil = reSharperUtil;
     _vimBufferCoordinatorFactory = vimBufferCoordinatorFactory;
 }
Пример #12
0
 internal ReSharperExtensionAdapter(IReSharperUtil reSharperUtil, ITextDocumentFactoryService textDocumentFactoryService)
 {
     _reSharperUtil = reSharperUtil;
     _textDocumentFactoryService = textDocumentFactoryService;
 }
Пример #13
0
 internal ReSharperExternalEditAdapter(IReSharperUtil reSharperUtil, IVimBufferCoordinatorFactory vimBufferCoordinatorFactory)
 {
     _reSharperUtil = reSharperUtil;
     _vimBufferCoordinatorFactory = vimBufferCoordinatorFactory;
 }
Пример #14
0
        internal static Result<VsCommandTarget> Create(
            IVimBufferCoordinator bufferCoordinator,
            IVsTextView vsTextView,
            ITextManager textManager,
            IVsAdapter adapter,
            IDisplayWindowBroker broker,
            IReSharperUtil resharperUtil,
            IKeyUtil keyUtil)
        {
            var vsCommandTarget = new VsCommandTarget(bufferCoordinator, textManager, adapter, broker, resharperUtil, keyUtil);
            var hresult = vsTextView.AddCommandFilter(vsCommandTarget, out vsCommandTarget._nextTarget);
            var result = Result.CreateSuccessOrError(vsCommandTarget, hresult);
            if (result.IsSuccess)
            {
                bufferCoordinator.VimBuffer.TextView.Properties[Key] = vsCommandTarget;
            }

            return result;
        }