Пример #1
0
 protected void Create(params string[] lines)
 {
     _vimBuffer       = CreateVimBuffer(lines);
     _textBuffer      = _vimBuffer.TextBuffer;
     _vimKeyProcessor = new VimKeyProcessor(_vimBuffer, KeyUtil);
     _simulation      = new KeyProcessorSimulation((IWpfTextView)_vimBuffer.TextView);
     _simulation.KeyProcessors.Add(_vimKeyProcessor);
 }
Пример #2
0
 protected void Create(params string[] lines)
 {
     _vimBuffer = CreateVimBuffer(lines);
     _textBuffer = _vimBuffer.TextBuffer;
     _vimKeyProcessor = new VimKeyProcessor(_vimBuffer, KeyUtil);
     _simulation = new KeyboardInputSimulation((IWpfTextView)_vimBuffer.TextView);
     _simulation.KeyProcessors.Add(_vimKeyProcessor);
 }
Пример #3
0
        /// <summary>
        /// Setup the KeyProcessor giving it the keyboard layout specified by the provided
        /// language id
        /// </summary>
        protected virtual void Setup(string languageId)
        {
            if (!String.IsNullOrEmpty(languageId))
            {
                _keyboardId = NativeMethods.LoadKeyboardLayout(languageId, NativeMethods.KLF_ACTIVATE, out _mustUnloadLayout);
                Assert.NotEqual(_keyboardId, IntPtr.Zero);
            }
            else
            {
                _keyboardId = IntPtr.Zero;
            }

            _processor = CreateKeyProcessor();
        }
Пример #4
0
        /// <summary>
        /// Setup the KeyProcessor giving it the keyboard layout specified by the provided
        /// language id
        /// </summary>
        protected virtual void Setup(string languageId)
        {
            if (!String.IsNullOrEmpty(languageId))
            {
                _keyboardId = NativeMethods.LoadKeyboardLayout(languageId, NativeMethods.KLF_ACTIVATE, out _mustUnloadLayout);
                Assert.NotEqual(_keyboardId, IntPtr.Zero);
            }
            else
            {
                _keyboardId = IntPtr.Zero;
            }

            _processor = CreateKeyProcessor();
        }
Пример #5
0
        /// <summary>
        /// Setup the KeyProcessor giving it the keyboard layout specified by the provided
        /// language id
        /// </summary>
        protected virtual void Setup(string languageId)
        {
            if (!String.IsNullOrEmpty(languageId))
            {
                _keyboardId = NativeMethods.LoadKeyboardLayout(languageId, NativeMethods.KLF_ACTIVATE, out _mustUnloadLayout);
                Assert.NotEqual(_keyboardId, IntPtr.Zero);
            }
            else
            {
                _keyboardId = IntPtr.Zero;
            }

            _factory   = new MockRepository(MockBehavior.Strict);
            _buffer    = _factory.Create <IVimBuffer>();
            _processor = new VimKeyProcessor(_buffer.Object);
        }
Пример #6
0
 public VimKeyProcessorTest()
 {
     _processor = CreateKeyProcessor();
 }
Пример #7
0
        /// <summary>
        /// Setup the KeyProcessor giving it the keyboard layout specified by the provided
        /// language id
        /// </summary>
        protected virtual void Setup(string languageId)
        {
            if (!String.IsNullOrEmpty(languageId))
            {
                _keyboardId = NativeMethods.LoadKeyboardLayout(languageId, NativeMethods.KLF_ACTIVATE, out _mustUnloadLayout);
                Assert.NotEqual(_keyboardId, IntPtr.Zero);
            }
            else
            {
                _keyboardId = IntPtr.Zero;
            }

            _factory = new MockRepository(MockBehavior.Strict);
            _buffer = _factory.Create<IVimBuffer>();
            _processor = new VimKeyProcessor(_buffer.Object, KeyUtil);
        }
Пример #8
0
 public VimKeyProcessorTest()
 {
     _processor = CreateKeyProcessor();
 }