protected VimTestBase() { _vim = CompositionContainer.GetExportedValue<IVim>(); _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>(); _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>(); _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>(); _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>(); _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>(); _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>(); _bulkOperations = CompositionContainer.GetExportedValue<IBulkOperations>(); _clipboardDevice = CompositionContainer.GetExportedValue<IClipboardDevice>(); _keyUtil = CompositionContainer.GetExportedValue<IKeyUtil>(); _clipboardDevice.Text = String.Empty; // One setting we do differ on for a default is 'timeout'. We don't want them interferring // with the reliability of tests. The default is on but turn it off here to prevent any // problems _vim.GlobalSettings.Timeout = false; // Don't let the personal VimRc of the user interfere with the unit tests _vim.AutoLoadVimRc = false; // Don't show trace information in the unit tests. It really clutters the output in an // xUnit run VimTrace.TraceSwitch.Level = TraceLevel.Off; }
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); }
protected VimTestBase() { _vim = CompositionContainer.GetExportedValue<IVim>(); _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>(); _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>(); _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>(); _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>(); _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>(); _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>(); _bulkOperations = CompositionContainer.GetExportedValue<IBulkOperations>(); _clipboardDevice = CompositionContainer.GetExportedValue<IClipboardDevice>(); _protectedOperations = new ProtectedOperations(_vimErrorDetector); }
internal VsVimHost( IVsAdapter adapter, ITextBufferUndoManagerProvider undoManagerProvider, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, ITextManager textManager, ITextDocumentFactoryService textDocumentFactoryService, IEditorOperationsFactoryService editorOperationsFactoryService, IWordUtilFactory wordUtilFactory, SVsServiceProvider serviceProvider) : base(textDocumentFactoryService, editorOperationsFactoryService) { _adapter = adapter; _editorAdaptersFactoryService = editorAdaptersFactoryService; _wordUtilFactory = wordUtilFactory; _dte = (_DTE)serviceProvider.GetService(typeof(_DTE)); _textManager = textManager; }
protected VimTestBase() { // Parts of the core editor in Vs2012 depend on there being an Application.Current value else // they will throw a NullReferenceException. Create one here to ensure the unit tests successfully // pass if (Application.Current == null) { new Application(); } _vim = CompositionContainer.GetExportedValue<IVim>(); _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>(); _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>(); _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>(); _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>(); _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>(); _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>(); _bulkOperations = CompositionContainer.GetExportedValue<IBulkOperations>(); _keyUtil = CompositionContainer.GetExportedValue<IKeyUtil>(); _vimProtectedOperations = CompositionContainer.GetExportedValue<IVimProtectedOperations>(); _keyboardDevice = CompositionContainer.GetExportedValue<IKeyboardDevice>(); _mouseDevice = CompositionContainer.GetExportedValue<IMouseDevice>(); _clipboardDevice = CompositionContainer.GetExportedValue<IClipboardDevice>(); _clipboardDevice.Text = String.Empty; // One setting we do differ on for a default is 'timeout'. We don't want them interfering // with the reliability of tests. The default is on but turn it off here to prevent any // problems _vim.GlobalSettings.Timeout = false; // Don't let the personal VimRc of the user interfere with the unit tests _vim.AutoLoadVimRc = false; // Don't show trace information in the unit tests. It really clutters the output in an // xUnit run VimTrace.TraceSwitch.Level = TraceLevel.Off; }
public override void SetupBase() { base.SetupBase(); _vim = CompositionContainer.GetExportedValue<IVim>(); _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>(); _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>(); _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>(); _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>(); _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>(); _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>(); _vimErrorDetector.Clear(); _protectedOperations = new ProtectedOperations(_vimErrorDetector); // One setting we do differ on for a default is 'timeout'. We don't want them interferring // with the reliability of tests. The default is on but turn it off here to prevent any // problems _vim.GlobalSettings.Timeout = false; // Don't let the personal VimRc of the user interfere with the unit tests _vim.AutoLoadVimRc = false; _vim.VimData.LastShellCommand = FSharpOption<string>.None; _vim.VimData.LastCommand = FSharpOption<StoredCommand>.None; }
public void SetupBase() { _compositionContainer = GetOrCreateCompositionContainer(); _vim = _compositionContainer.GetExportedValue<IVim>(); _vimBufferFactory = _compositionContainer.GetExportedValue<IVimBufferFactory>(); _textBufferFactoryService = _compositionContainer.GetExportedValue<ITextBufferFactoryService>(); _textEditorFactoryService = _compositionContainer.GetExportedValue<ITextEditorFactoryService>(); _vimErrorDetector = _compositionContainer.GetExportedValue<IVimErrorDetector>(); _commonOperationsFactory = _compositionContainer.GetExportedValue<ICommonOperationsFactory>(); _wordUtilFactory = _compositionContainer.GetExportedValue<IWordUtilFactory>(); _bufferTrackingService = _compositionContainer.GetExportedValue<IBufferTrackingService>(); _foldManagerFactory = _compositionContainer.GetExportedValue<IFoldManagerFactory>(); _smartIndentationService = _compositionContainer.GetExportedValue<ISmartIndentationService>(); _vimErrorDetector.Clear(); _protectedOperations = new ProtectedOperations(_vimErrorDetector); }
public override void SetupBase() { base.SetupBase(); _vim = CompositionContainer.GetExportedValue<IVim>(); _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>(); _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>(); _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>(); _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>(); _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>(); _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>(); _vimErrorDetector.Clear(); _protectedOperations = new ProtectedOperations(_vimErrorDetector); }