Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 internal StandardCommandTargetFactory(
     ITextManager textManager,
     ICommonOperationsFactory commonOperationsFactory,
     IDisplayWindowBrokerFactoryService displayWindowBrokerFactory)
 {
     _textManager                = textManager;
     _commonOperationsFactory    = commonOperationsFactory;
     _displayWindowBrokerFactory = displayWindowBrokerFactory;
 }
Esempio n. 4
0
 internal CommandMarginProvider(
     IVim vim,
     IEditorFormatMapService editorFormatMapService,
     IClassificationFormatMapService classificationFormatMapService,
     ICommonOperationsFactory commonOperationsFactory)
 {
     _vim = vim;
     _editorFormatMapService         = editorFormatMapService;
     _classificationFormatMapService = classificationFormatMapService;
     _commonOperationsFactory        = commonOperationsFactory;
 }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 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>();
     _editorOperationsFactoryService = _compositionContainer.GetExportedValue <IEditorOperationsFactoryService>();
     _vimErrorDetector.Clear();
     _protectedOperations = new ProtectedOperations(_vimErrorDetector);
 }
Esempio n. 7
0
        public VimEditorHost(CompositionContainer compositionContainer) : base(compositionContainer)
        {
            _vim = CompositionContainer.GetExportedValue <IVim>();
            _vimBufferFactory        = CompositionContainer.GetExportedValue <IVimBufferFactory>();
            _vimErrorDetector        = CompositionContainer.GetExportedValue <IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue <ICommonOperationsFactory>();
            _bufferTrackingService   = CompositionContainer.GetExportedValue <IBufferTrackingService>();
            _foldManagerFactory      = CompositionContainer.GetExportedValue <IFoldManagerFactory>();
            _bulkOperations          = CompositionContainer.GetExportedValue <IBulkOperations>();
            _keyUtil             = CompositionContainer.GetExportedValue <IKeyUtil>();
            _protectedOperations = CompositionContainer.GetExportedValue <IProtectedOperations>();

            _keyboardDevice                 = CompositionContainer.GetExportedValue <IKeyboardDevice>();
            _mouseDevice                    = CompositionContainer.GetExportedValue <IMouseDevice>();
            _clipboardDevice                = CompositionContainer.GetExportedValue <IClipboardDevice>();
            _editorFormatMapService         = CompositionContainer.GetExportedValue <IEditorFormatMapService>();
            _classificationFormatMapService = CompositionContainer.GetExportedValue <IClassificationFormatMapService>();
        }
Esempio n. 8
0
        public VimEditorHost(CompositionContainer compositionContainer)
            : base(compositionContainer)
        {
            _vim = CompositionContainer.GetExportedValue<IVim>();
            _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>();
            _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>();
            _wordUtil = CompositionContainer.GetExportedValue<IWordUtil>();
            _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>();
        }
Esempio n. 9
0
        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;
        }
Esempio n. 10
0
        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>();
            _wordUtil = CompositionContainer.GetExportedValue<IWordUtil>();
            _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;
        }
Esempio n. 11
0
        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;
        }
Esempio n. 12
0
 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);
 }
Esempio n. 13
0
 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);
 }