public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IResharperUtil resharperUtil, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, IVsAdapter adapter, IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _resharperUtil = resharperUtil; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _vim.AutoLoadVimRc = false; }
public HostFactory( IVim vim, IVsEditorAdaptersFactoryService adaptersFactory, IReSharperUtil resharperUtil, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, ITextManager textManager, IVsAdapter adapter, IVimProtectedOperations 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 }
internal VsVimHost( IVsAdapter adapter, ITextBufferFactoryService textBufferFactoryService, ITextEditorFactoryService textEditorFactoryService, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, ISmartIndentationService smartIndentationService, ITextManager textManager, ISharedServiceFactory sharedServiceFactory, IVimApplicationSettings vimApplicationSettings, SVsServiceProvider serviceProvider) : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService) { _vsAdapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility)); _textManager = textManager; _sharedService = sharedServiceFactory.Create(); _vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>(); _fontProperties = new TextEditorFontProperties(serviceProvider); _vimApplicationSettings = vimApplicationSettings; _smartIndentationService = smartIndentationService; uint cookie; _vsMonitorSelection.AdviseSelectionEvents(this, out cookie); }
internal VsKeyProcessorProvider(IVim vim, IVsAdapter adapter, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil) { _vim = vim; _adapter = adapter; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; }
internal static Result <VsCommandTarget> Create( IVimBufferCoordinator vimBufferCoordinator, IVsTextView vsTextView, ITextManager textManager, IVsAdapter adapter, IDisplayWindowBroker broker, IKeyUtil keyUtil, IVimApplicationSettings vimApplicationSettings, ReadOnlyCollection <ICommandTargetFactory> commandTargetFactoryList) { var vsCommandTarget = new VsCommandTarget(vimBufferCoordinator, textManager, adapter, broker, keyUtil, vimApplicationSettings); var hresult = vsTextView.AddCommandFilter(vsCommandTarget, out IOleCommandTarget nextCommandTarget); if (ErrorHandler.Failed(hresult)) { return(Result.CreateError(hresult)); } var commandTargets = commandTargetFactoryList .Select(x => x.CreateCommandTarget(nextCommandTarget, vimBufferCoordinator)) .Where(x => x != null) .ToReadOnlyCollection(); vsCommandTarget.CompleteInit(nextCommandTarget, commandTargets); return(Result.CreateSuccess(vsCommandTarget)); }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IExternalEditorManager externalEditorManager, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, IVsAdapter adapter, IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _externalEditorManager = externalEditorManager; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IResharperUtil resharperUtil, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, IVsAdapter adapter, [EditorUtilsImport] IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _resharperUtil = resharperUtil; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; _vim.AutoLoadVimRc = false; #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif }
internal VsKeyProcessor(IVsAdapter adapter, IVimBufferCoordinator bufferCoordinator, IKeyUtil keyUtil) : base(bufferCoordinator.VimBuffer, keyUtil) { _adapter = adapter; _bufferCoordinator = bufferCoordinator; _searchInProgressInfo = new Lazy<PropertyInfo>(FindSearchInProgressPropertyInfo); }
internal VsKeyProcessor(IVsAdapter adapter, IVimBufferCoordinator bufferCoordinator, IKeyUtil keyUtil) : base(bufferCoordinator.VimBuffer, keyUtil) { _adapter = adapter; _bufferCoordinator = bufferCoordinator; _searchInProgressInfo = new Lazy <PropertyInfo>(FindSearchInProgressPropertyInfo); }
internal VsVimHost( IVsAdapter adapter, ITextBufferFactoryService textBufferFactoryService, ITextEditorFactoryService textEditorFactoryService, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, ISmartIndentationService smartIndentationService, ITextManager textManager, ISharedServiceFactory sharedServiceFactory, IVimApplicationSettings vimApplicationSettings, IExtensionAdapterBroker extensionAdapterBroker, SVsServiceProvider serviceProvider, ITelemetryProvider telemetryProvider) : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService) { _vsAdapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility)); _textManager = textManager; _sharedService = sharedServiceFactory.Create(); _vsMonitorSelection = serviceProvider.GetService <SVsShellMonitorSelection, IVsMonitorSelection>(); _vimApplicationSettings = vimApplicationSettings; _smartIndentationService = smartIndentationService; _extensionAdapterBroker = extensionAdapterBroker; _vsMonitorSelection.AdviseSelectionEvents(this, out uint cookie); InitTelemetry(telemetryProvider.GetOrCreate(vimApplicationSettings, _dte), vimApplicationSettings); }
internal VsVimHost( IVsAdapter adapter, ITextBufferFactoryService textBufferFactoryService, ITextEditorFactoryService textEditorFactoryService, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IWordUtilFactory wordUtilFactory, ITextManager textManager, ISharedServiceFactory sharedServiceFactory, SVsServiceProvider serviceProvider) : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService) { _vsAdapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _wordUtilFactory = wordUtilFactory; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility)); _textManager = textManager; _sharedService = sharedServiceFactory.Create(); _vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>(); uint cookie; _vsMonitorSelection.AdviseSelectionEvents(this, out cookie); }
internal VimRcLoadNotificationMarginProvider(IVim vim, IVimApplicationSettings vimApplicationSettings, IToastNotificationServiceProvider toastNotificationServiceProvider, IVsAdapter vsAdapter) { _vim = vim; _vimApplicationSettings = vimApplicationSettings; _toastNotificationServiceProvider = toastNotificationServiceProvider; _vsAdapter = vsAdapter; }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IResharperUtil resharperUtil, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, ITextManager textManager, IVsAdapter adapter, [EditorUtilsImport] IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _resharperUtil = resharperUtil; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _textManager = textManager; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif }
public HostFactory( IVim vim, IVsEditorAdaptersFactoryService adaptersFactory, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, ITextManager textManager, IVsAdapter adapter, IVimProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil, IEditorToSettingsSynchronizer editorToSettingSynchronizer, [ImportMany] IEnumerable<Lazy<ICommandTargetFactory, IOrderable>> commandTargetFactoryList) { _vim = vim; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _textManager = textManager; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; _editorToSettingSynchronizer = editorToSettingSynchronizer; _commandTargetFactoryList = Orderer.Order(commandTargetFactoryList).Select(x => x.Value).ToReadOnlyCollection(); #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif }
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 }
internal VsVimHost( IVsAdapter adapter, ITextBufferFactoryService textBufferFactoryService, ITextEditorFactoryService textEditorFactoryService, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IWordUtilFactory wordUtilFactory, ITextManager textManager, ISharedServiceFactory sharedServiceFactory, SVsServiceProvider serviceProvider) : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService) { _vsAdapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _wordUtilFactory = wordUtilFactory; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility)); _textManager = textManager; _sharedService = sharedServiceFactory.Create(); _vsMonitorSelection = serviceProvider.GetService <SVsShellMonitorSelection, IVsMonitorSelection>(); uint cookie; _vsMonitorSelection.AdviseSelectionEvents(this, out cookie); }
public HostFactory( IVim vim, IVsEditorAdaptersFactoryService adaptersFactory, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, ITextManager textManager, IVsAdapter adapter, IVimProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil, IEditorToSettingsSynchronizer editorToSettingSynchronizer, [ImportMany] IEnumerable <Lazy <ICommandTargetFactory, IOrderable> > commandTargetFactoryList) { _vim = vim; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _textManager = textManager; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; _editorToSettingSynchronizer = editorToSettingSynchronizer; _commandTargetFactoryList = Orderer.Order(commandTargetFactoryList).Select(x => x.Value).ToReadOnlyCollection(); #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif }
internal VsVimKeyProcessorProvider(IVim vim, IVsAdapter adapter, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil, IReportDesignerUtil reportDesignerUtil) { _vim = vim; _adapter = adapter; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; _reportDesignerUtil = reportDesignerUtil; }
internal TextManager( IVsAdapter adapter, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferFactoryService textBufferFactoryService, ISharedServiceFactory sharedServiceFactory, SVsServiceProvider serviceProvider) : this(adapter, textDocumentFactoryService, textBufferFactoryService, sharedServiceFactory.Create(), serviceProvider) { }
internal VsKeyProcessor(IVsAdapter adapter, IVimBufferCoordinator bufferCoordinator, IKeyUtil keyUtil, IReportDesignerUtil reportDesignerUtil, IWpfTextView wpfTextView) : base(bufferCoordinator.VimBuffer, keyUtil, wpfTextView) { _adapter = adapter; _reportDesignerUtil = reportDesignerUtil; _bufferCoordinator = bufferCoordinator; _searchInProgressInfo = new Lazy<PropertyInfo>(FindSearchInProgressPropertyInfo); }
internal VsKeyProcessor(IVsAdapter adapter, IVimBufferCoordinator bufferCoordinator, IKeyUtil keyUtil, IReportDesignerUtil reportDesignerUtil, IWpfTextView wpfTextView) : base(bufferCoordinator.VimBuffer, keyUtil, wpfTextView) { _adapter = adapter; _reportDesignerUtil = reportDesignerUtil; _bufferCoordinator = bufferCoordinator; _searchInProgressInfo = new Lazy <PropertyInfo>(FindSearchInProgressPropertyInfo); }
internal ExternalEditorManager( IVsAdapter vsAdapter, IProtectedOperations protectedOperations, [ImportMany] IEnumerable<IExternalEditAdapter> adapters) { _vsAdapter = vsAdapter; _protectedOperations = protectedOperations; _adapterList = adapters.ToList(); }
private VsCommandTarget( IVimBuffer buffer, IVsAdapter adapter, IExternalEditorManager externalEditorManager) { _buffer = buffer; _adapter = adapter; _externalEditManager = externalEditorManager; }
internal TextManager( IVsAdapter adapter, SVsServiceProvider serviceProvider) { _adapter = adapter; _serviceProvider = serviceProvider; _textManager = _serviceProvider.GetService<SVsTextManager, IVsTextManager>(); _table = new RunningDocumentTable(_serviceProvider); }
internal ExternalEditorManager( IVsAdapter vsAdapter, IVimProtectedOperations protectedOperations, [ImportMany] IEnumerable <IExternalEditAdapter> adapters) { _vsAdapter = vsAdapter; _protectedOperations = protectedOperations; _adapterList = adapters.ToList(); }
protected override void Initialize() { base.Initialize(); _componentModel = (IComponentModel)GetService(typeof(SComponentModel)); _exportProvider = _componentModel.DefaultExportProvider; _vim = _exportProvider.GetExportedValue <IVim>(); _vsAdapter = _exportProvider.GetExportedValue <IVsAdapter>(); }
internal TextManager( IVsAdapter adapter, SVsServiceProvider serviceProvider) { _adapter = adapter; _serviceProvider = serviceProvider; _textManager = _serviceProvider.GetService <SVsTextManager, IVsTextManager>(); _table = new RunningDocumentTable(_serviceProvider); }
internal FallbackKeyProcessorProvider(SVsServiceProvider serviceProvider, IKeyUtil keyUtil, IVimApplicationSettings vimApplicationSettings, IVim vim, IVsAdapter vsAdapter) { _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _keyUtil = keyUtil; _vimApplicationSettings = vimApplicationSettings; _vim = vim; _vsAdapter = vsAdapter; _vsShell = (IVsShell)serviceProvider.GetService(typeof(SVsShell)); _scopeData = new ScopeData(_vsShell); }
private VsCommandTarget( IVimBuffer buffer, IVsAdapter adapter, IDisplayWindowBroker broker, IExternalEditorManager externalEditorManager) { _buffer = buffer; _adapter = adapter; _broker = broker; _externalEditManager = externalEditorManager; }
internal ExternalEditorManager(SVsServiceProvider serviceProvider, IVsAdapter vsAdapter) { _vsAdapter = vsAdapter; _vsShell = serviceProvider.GetService<SVsShell, IVsShell>(); _adapterList.Add(new SnippetExternalEditAdapter()); _isResharperInstalled = CheckResharperInstalled(); if (_isResharperInstalled) { _adapterList.Add(new ResharperExternalEditAdapter()); } }
internal ExternalEditorManager( IVimApplicationSettings vimApplicationSettings, IVsAdapter vsAdapter, IVimProtectedOperations protectedOperations, [ImportMany] IEnumerable<IExternalEditAdapter> adapters) { _vimApplicationSettings = vimApplicationSettings; _vsAdapter = vsAdapter; _protectedOperations = protectedOperations; _adapterList = adapters.ToList(); }
internal static Result <VsCommandTarget> Create( IVimBufferCoordinator bufferCoordinator, IVsTextView vsTextView, IVsAdapter adapter, IDisplayWindowBroker broker, IExternalEditorManager externalEditorManager) { var filter = new VsCommandTarget(bufferCoordinator, adapter, broker, externalEditorManager); var hresult = vsTextView.AddCommandFilter(filter, out filter._nextTarget); return(Result.CreateSuccessOrError(filter, hresult)); }
internal VsCommandTarget( IVimBufferCoordinator vimBufferCoordinator, ITextManager textManager, IVsAdapter vsAdapter, IDisplayWindowBroker broker, IKeyUtil keyUtil, IOleCommandTarget nextTarget, ReadOnlyCollection<ICommandTarget> commandTargets) : this(vimBufferCoordinator, textManager, vsAdapter, broker, keyUtil) { CompleteInit(nextTarget, commandTargets); }
internal ExternalEditorManager(SVsServiceProvider serviceProvider, IVsAdapter vsAdapter, IProtectedOperations protectedOperations) { _vsAdapter = vsAdapter; _protectedOperations = protectedOperations; _vsShell = serviceProvider.GetService <SVsShell, IVsShell>(); _adapterList.Add(new SnippetExternalEditAdapter()); _isResharperInstalled = CheckResharperInstalled(); if (_isResharperInstalled) { _adapterList.Add(new ResharperExternalEditAdapter()); } }
internal VsCommandTarget( IVimBufferCoordinator vimBufferCoordinator, ITextManager textManager, IVsAdapter vsAdapter, IDisplayWindowBroker broker, IKeyUtil keyUtil, IOleCommandTarget nextTarget, ReadOnlyCollection <ICommandTarget> commandTargets) : this(vimBufferCoordinator, textManager, vsAdapter, broker, keyUtil) { CompleteInit(nextTarget, commandTargets); }
internal TextManager( IVsAdapter adapter, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferFactoryService textBufferFactoryService, SVsServiceProvider serviceProvider) { _vsAdapter = adapter; _serviceProvider = serviceProvider; _textManager = _serviceProvider.GetService<SVsTextManager, IVsTextManager>(); _textDocumentFactoryService = textDocumentFactoryService; _textBufferFactoryService = textBufferFactoryService; _table = new RunningDocumentTable(_serviceProvider); }
private VsCommandTarget( IVimBufferCoordinator bufferCoordinator, IVsAdapter vsAdapter, IDisplayWindowBroker broker, IExternalEditorManager externalEditorManager) { _buffer = bufferCoordinator.VimBuffer; _bufferCoordinator = bufferCoordinator; _textBuffer = _buffer.TextBuffer; _vsAdapter = vsAdapter; _broker = broker; _externalEditManager = externalEditorManager; }
internal VsFilterKeysAdapter( IVsFilterKeys filterKeys, IVsCodeWindow codeWindow, IVsAdapter vsAdapter, IVimBuffer buffer) { _filterKeys = filterKeys; _buffer = buffer; _vsAdapter = vsAdapter; _codeWindow = codeWindow; _buffer.Closed += delegate { Uninstall(); }; }
internal TextManager( IVsAdapter adapter, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferFactoryService textBufferFactoryService, SVsServiceProvider serviceProvider) { _vsAdapter = adapter; _serviceProvider = serviceProvider; _textManager = _serviceProvider.GetService <SVsTextManager, IVsTextManager>(); _textDocumentFactoryService = textDocumentFactoryService; _textBufferFactoryService = textBufferFactoryService; _table = new RunningDocumentTable(_serviceProvider); }
private VsCommandTarget( IVimBufferCoordinator bufferCoordinator, IVsAdapter vsAdapter, IDisplayWindowBroker broker, IResharperUtil resharperUtil) { _vimBuffer = bufferCoordinator.VimBuffer; _vim = _vimBuffer.Vim; _bufferCoordinator = bufferCoordinator; _textBuffer = _vimBuffer.TextBuffer; _vsAdapter = vsAdapter; _broker = broker; _resharperUtil = resharperUtil; }
internal VsVimHost( IVsAdapter adapter, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ITextManager textManager, ITextDocumentFactoryService textDocumentFactoryService, SVsServiceProvider serviceProvider) : base(textDocumentFactoryService) { _adapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _textManager = textManager; }
/// <summary> /// Try and install the IVsFilterKeys adapter for the given ITextView. /// </summary> internal static bool TryInstallFilterKeysAdapter( IVsAdapter adapter, IEditorOptionsFactoryService optionsFactory, IVimBuffer buffer) { var textView = buffer.TextView; if (textView.Properties.ContainsProperty(s_key)) { return(true); } var textLines = adapter.EditorAdapter.GetBufferAdapter(buffer.TextBuffer) as IVsTextLines; if (textLines == null) { return(false); } IVsCodeWindow codeWindow; if (!adapter.GetCodeWindow(textView).TryGetValue(out codeWindow)) { return(false); } // Grab the field we need to replace. Be wary that Venus uses a different implementation // and the field will not be available var type = codeWindow.GetType(); var flags = System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic; var field = type.GetField(FieldName, flags); if (field == null) { return(false); } var oldValue = field.GetValue(codeWindow) as IVsFilterKeys; if (oldValue == null) { return(false); } var filterKeysAdapter = new VsFilterKeysAdapter(oldValue, codeWindow, adapter, buffer); field.SetValue(codeWindow, filterKeysAdapter); return(true); }
internal VsVimHost( IVsAdapter adapter, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ITextManager textManager, ITextDocumentFactoryService textDocumentFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, SVsServiceProvider serviceProvider) : base(textDocumentFactoryService, editorOperationsFactoryService) { _adapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _textManager = textManager; }
private VsCommandTarget( IVimBufferCoordinator vimBufferCoordinator, ITextManager textManager, IVsAdapter vsAdapter, IDisplayWindowBroker broker, IKeyUtil keyUtil) { _vimBuffer = vimBufferCoordinator.VimBuffer; _vim = _vimBuffer.Vim; _vimBufferCoordinator = vimBufferCoordinator; _textBuffer = _vimBuffer.TextBuffer; _vsAdapter = vsAdapter; _broker = broker; _keyUtil = keyUtil; }
internal TextManager( IVsAdapter adapter, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferFactoryService textBufferFactoryService, ISharedService sharedService, SVsServiceProvider serviceProvider) { _vsAdapter = adapter; _serviceProvider = serviceProvider; _textManager = _serviceProvider.GetService <SVsTextManager, IVsTextManager>(); _textDocumentFactoryService = textDocumentFactoryService; _textBufferFactoryService = textBufferFactoryService; _runningDocumentTable = _serviceProvider.GetService <SVsRunningDocumentTable, IVsRunningDocumentTable>(); _sharedService = sharedService; }
internal TextManager( IVsAdapter adapter, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferFactoryService textBufferFactoryService, ISharedService sharedService, SVsServiceProvider serviceProvider) { _vsAdapter = adapter; _serviceProvider = serviceProvider; _textManager = _serviceProvider.GetService<SVsTextManager, IVsTextManager>(); _textDocumentFactoryService = textDocumentFactoryService; _textBufferFactoryService = textBufferFactoryService; _runningDocumentTable = _serviceProvider.GetService<SVsRunningDocumentTable, IVsRunningDocumentTable>(); _sharedService = sharedService; }
public VsAdapterTest() { _factory = new MockRepository(MockBehavior.Loose); _editorAdapterFactory = _factory.Create<IVsEditorAdaptersFactoryService>(); _editorOptionsFactory = _factory.Create<IEditorOptionsFactoryService>(); _incrementalSearchFactoryService = _factory.Create<IIncrementalSearchFactoryService>(); _serviceProvider = _factory.Create<SVsServiceProvider>(); _serviceProvider.MakeService<SVsTextManager, IVsTextManager>(_factory); _serviceProvider.MakeService<SVsUIShell, IVsUIShell>(_factory); _serviceProvider.MakeService<SVsRunningDocumentTable, IVsRunningDocumentTable>(_factory); _adapterRaw = new VsAdapter( _editorAdapterFactory.Object, _editorOptionsFactory.Object, _incrementalSearchFactoryService.Object, _serviceProvider.Object); _adapter = _adapterRaw; }
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; }
internal VsVimHost( IVsAdapter adapter, ITextBufferFactoryService textBufferFactoryService, ITextEditorFactoryService textEditorFactoryService, ITextDocumentFactoryService textDocumentFactoryService, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IWordUtilFactory wordUtilFactory, ITextManager textManager, SVsServiceProvider serviceProvider) : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService) { _vsAdapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _wordUtilFactory = wordUtilFactory; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _textManager = textManager; }