public virtual void Create(params string[] lines)
 {
     _vimBuffer = CreateVimBuffer(lines);
     _vimBuffer.StatusMessage += (sender, args) => { _lastStatus = args.Message; };
     _textView = _vimBuffer.TextView;
     _textBuffer = _textView.TextBuffer;
     _vimHost = VimHost;
     _commandMode = _vimBuffer.CommandMode;
 }
Esempio n. 2
0
 internal virtual void Create(params string[] lines)
 {
     _vimBuffer = CreateVimBuffer(lines);
     _vimBuffer.StatusMessage += (sender, args) => { _lastStatus = args.Message; };
     _textView    = _vimBuffer.TextView;
     _textBuffer  = _textView.TextBuffer;
     _vimHost     = VimHost;
     _commandMode = _vimBuffer.CommandMode;
 }
Esempio n. 3
0
        public CommandModeTest()
        {
            _textView = CreateTextView();
            _textBuffer = _textView.TextBuffer;
            _vimBuffer = CreateVimBuffer(CreateVimBufferData(_textView));

            var factory = new MockRepository(MockBehavior.Strict);
            var commonOperations = CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData);
            _modeRaw = new CommandMode(_vimBuffer, commonOperations);
            _mode = _modeRaw;
        }
Esempio n. 4
0
        public CommandModeTest()
        {
            _textView   = CreateTextView();
            _textBuffer = _textView.TextBuffer;
            _vimBuffer  = CreateVimBuffer(CreateVimBufferData(_textView));

            var factory          = new MockRepository(MockBehavior.Strict);
            var commonOperations = CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData);

            _modeRaw = new CommandMode(_vimBuffer, commonOperations);
            _mode    = _modeRaw;
        }
Esempio n. 5
0
        public CommandModeTest()
        {
            _textView = CreateTextView();
            _textBuffer = _textView.TextBuffer;
            _vimBuffer = CreateVimBuffer(CreateVimBufferData(_textView));

            var factory = new MockRepository(MockBehavior.Strict);
            var commonOperations = CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData);
            var interpreter = new Interpreter.Interpreter(
                _vimBuffer,
                commonOperations,
                factory.Create<IFoldManager>().Object,
                factory.Create<IFileSystem>().Object,
                factory.Create<IBufferTrackingService>().Object);
            _modeRaw = new CommandMode(_vimBuffer, commonOperations, interpreter);
            _mode = _modeRaw;
        }
Esempio n. 6
0
        public CommandModeTest()
        {
            _textView   = CreateTextView();
            _textBuffer = _textView.TextBuffer;
            _vimBuffer  = CreateVimBuffer(CreateVimBufferData(_textView));

            var factory          = new MockRepository(MockBehavior.Strict);
            var commonOperations = CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData);
            var interpreter      = new Interpreter.Interpreter(
                _vimBuffer,
                commonOperations,
                factory.Create <IFoldManager>().Object,
                factory.Create <IFileSystem>().Object,
                factory.Create <IBufferTrackingService>().Object);

            _modeRaw = new CommandMode(_vimBuffer, commonOperations, interpreter);
            _mode    = _modeRaw;
        }
Esempio n. 7
0
        public void SetUp()
        {
            _factory = new MockRepository(MockBehavior.Strict);
            _selection = _factory.Create<ITextSelection>();
            _selection.Setup(x => x.IsEmpty).Returns(true);
            _operations = _factory.Create<ICommonOperations>();
            _buffer = EditorUtil.CreateTextBuffer();
            _caret = MockObjectFactory.CreateCaret(factory: _factory);
            _caret.SetupProperty(x => x.IsHidden);
            _textView = MockObjectFactory.CreateTextView(
                textBuffer: _buffer,
                caret: _caret.Object,
                selection: _selection.Object,
                factory: _factory);

            _bufferData = MockObjectFactory.CreateVimBuffer(textView: _textView.Object, factory: _factory);
            _processor = _factory.Create<ICommandProcessor>();
            _modeRaw = new CommandMode(_bufferData.Object, _processor.Object, _operations.Object);
            _mode = _modeRaw;
        }
Esempio n. 8
0
        public void SetUp()
        {
            _factory = new MockRepository(MockBehavior.Strict);
            _selection = _factory.Create<ITextSelection>();
            _selection.Setup(x => x.IsEmpty).Returns(true);
            _buffer = EditorUtil.CreateBuffer();
            _caret = MockObjectFactory.CreateCaret(factory: _factory);
            _caret.SetupProperty(x => x.IsHidden);
            _textView = MockObjectFactory.CreateTextView(
                buffer: _buffer,
                caret: _caret.Object,
                selection: _selection.Object,
                factory: _factory);

            _bufferData = MockObjectFactory.CreateVimBuffer(view: _textView.Object, factory: _factory);
            _processor = _factory.Create<ICommandProcessor>();
            _modeRaw = new CommandMode(_bufferData.Object, _processor.Object);
            _mode = _modeRaw;
        }
Esempio n. 9
0
        public void SetUp()
        {
            _caret = MockObjectFactory.CreateCaret();
            _caret.SetupProperty(x => x.IsHidden);
            _view = new Mock<IWpfTextView>(MockBehavior.Strict);
            _view.SetupGet(x => x.Caret).Returns(_caret.Object);

            _bufferData = MockObjectFactory.CreateVimBuffer(view:_view.Object);
            _processor = new Mock<ICommandProcessor>(MockBehavior.Strict);
            _modeRaw = new CommandMode(_bufferData.Object, _processor.Object);
            _mode = _modeRaw;
        }
Esempio n. 10
0
 public override bool ChangeFG(ICommandMode oldMode)
 {
     return(false);
 }