当前位置: 首页>>代码示例>>C#>>正文


C# IVimBufferData类代码示例

本文整理汇总了C#中IVimBufferData的典型用法代码示例。如果您正苦于以下问题:C# IVimBufferData类的具体用法?C# IVimBufferData怎么用?C# IVimBufferData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IVimBufferData类属于命名空间,在下文中一共展示了IVimBufferData类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateVimBuffer

 /// <summary>
 /// Create an IVimBuffer instance with the given VimBufferData value
 /// </summary>
 protected IVimBuffer CreateVimBuffer(IVimBufferData vimBufferData)
 {
     return _vimBufferFactory.CreateVimBuffer(vimBufferData);
 }
开发者ID:cloudstrifegit,项目名称:VsVim,代码行数:7,代码来源:VimTestBase.cs

示例2: CreateCommandUtil

 internal CommandUtil CreateCommandUtil(
     IVimBufferData vimBufferData,
     IMotionUtil motionUtil = null,
     ICommonOperations operations = null,
     IFoldManager foldManager = null,
     InsertUtil insertUtil = null)
 {
     motionUtil = motionUtil ?? new MotionUtil(vimBufferData, operations);
     operations = operations ?? CommonOperationsFactory.GetCommonOperations(vimBufferData);
     foldManager = foldManager ?? VimUtil.CreateFoldManager(vimBufferData.TextView, vimBufferData.StatusUtil);
     insertUtil = insertUtil ?? new InsertUtil(vimBufferData, operations);
     return new CommandUtil(
         vimBufferData,
         motionUtil,
         operations,
         foldManager,
         insertUtil,
         _bulkOperations);
 }
开发者ID:cloudstrifegit,项目名称:VsVim,代码行数:19,代码来源:VimTestBase.cs

示例3: CreateCommonOperations

 internal virtual ICommonOperations CreateCommonOperations(IVimBufferData vimBufferData)
 {
     return CommonOperationsFactory.GetCommonOperations(vimBufferData);
 }
开发者ID:louisfeng,项目名称:VsVim,代码行数:4,代码来源:CommandUtilTest.cs

示例4: CreateCommandUtil

 internal CommandUtil CreateCommandUtil(
     IVimBufferData vimBufferData,
     IMotionUtil motionUtil = null,
     ICommonOperations operations = null,
     IFoldManager foldManager = null,
     InsertUtil insertUtil = null)
 {
     motionUtil = motionUtil ?? new MotionUtil(vimBufferData, operations);
     operations = operations ?? CommonOperationsFactory.GetCommonOperations(vimBufferData);
     foldManager = foldManager ?? VimUtil.CreateFoldManager(vimBufferData.TextView, vimBufferData.StatusUtil);
     insertUtil = insertUtil ?? new InsertUtil(vimBufferData, motionUtil, operations);
     var lineChangeTracker = new LineChangeTracker(vimBufferData);
     return new CommandUtil(
         vimBufferData,
         motionUtil,
         operations,
         foldManager,
         insertUtil,
         _vimEditorHost.BulkOperations,
         MouseDevice,
         lineChangeTracker);
 }
开发者ID:Deleriumdoll,项目名称:VsVim,代码行数:22,代码来源:VimTestBase.cs

示例5: Create

 private void Create(VisualKind kind, int caretPosition, params string[] lines)
 {
     _textView = CreateTextView(lines);
     _textView.MoveCaretTo(caretPosition);
     _globalSettings = new GlobalSettings();
     var localSettings = new LocalSettings(_globalSettings);
     var vimTextBuffer = MockObjectFactory.CreateVimTextBuffer(_textView.TextBuffer, localSettings);
     _vimBufferData = MockObjectFactory.CreateVimBufferData(vimTextBuffer.Object, _textView);
     _incrementalSearch = new Mock<IIncrementalSearch>(MockBehavior.Loose);
     _tracker = new SelectionTracker(_vimBufferData, _incrementalSearch.Object, kind);
     _tracker.Start();
 }
开发者ID:Kazark,项目名称:VsVim,代码行数:12,代码来源:SelectionTrackerTest.cs

示例6: Create

        protected virtual void Create(params string[] lines)
        {
            _context = new TestableSynchronizationContext();
            SynchronizationContext.SetSynchronizationContext(_context);
            _textView = CreateTextView(lines);
            _textBuffer = _textView.TextBuffer;
            _vimBuffer = Vim.CreateVimBuffer(_textView);
            _vimBuffer.SwitchMode(ModeKind.Normal, ModeArgument.None);
            _vimBufferData = _vimBuffer.VimBufferData;
            _vimTextBuffer = _vimBuffer.VimTextBuffer;
            _registerMap = _vimBuffer.RegisterMap;
            _globalSettings = _vimBuffer.LocalSettings.GlobalSettings;
            Assert.True(_context.IsEmpty);

            // Need to make sure it's focused so macro recording will work
            ((MockVimHost)_vimBuffer.Vim.VimHost).FocusedTextView = _textView;
        }
开发者ID:ramboma,项目名称:VsVim,代码行数:17,代码来源:VisualModeIntegrationTest.cs

示例7: Create

        protected virtual void Create(params string[] lines)
        {
            _textView = CreateTextView(lines);
            _textBuffer = _textView.TextBuffer;
            _vimBuffer = Vim.CreateVimBuffer(_textView);
            _vimBuffer.ErrorMessage +=
                (_, message) =>
                {
                    if (_assertOnErrorMessage)
                    {
                        throw new Exception("Error Message: " + message.Message);
                    }
                };
            _vimBuffer.WarningMessage +=
                (_, message) =>
                {
                    if (_assertOnWarningMessage)
                    {
                        throw new Exception("Warning Message: " + message.Message);
                    }
                };
            _vimBufferData = _vimBuffer.VimBufferData;
            _vimTextBuffer = _vimBuffer.VimTextBuffer;
            _normalMode = _vimBuffer.NormalMode;
            _keyMap = _vimBuffer.Vim.KeyMap;
            _localSettings = _vimBuffer.LocalSettings;
            _globalSettings = _localSettings.GlobalSettings;
            _windowSettings = _vimBuffer.WindowSettings;
            _jumpList = _vimBuffer.JumpList;
            _vimHost = (MockVimHost)_vimBuffer.Vim.VimHost;
            _vimHost.BeepCount = 0;
            _vimData = Vim.VimData;
            _foldManager = FoldManagerFactory.GetFoldManager(_textView);
            _clipboardDevice = (TestableClipboardDevice)CompositionContainer.GetExportedValue<IClipboardDevice>();

            // Many of the operations operate on both the visual and edit / text snapshot
            // simultaneously.  Ensure that our setup code is producing a proper IElisionSnapshot
            // for the Visual portion so we can root out any bad mixing of instances between
            // the two
            Assert.True(_textView.VisualSnapshot is IElisionSnapshot);
            Assert.True(_textView.VisualSnapshot != _textView.TextSnapshot);
        }
开发者ID:Deleriumdoll,项目名称:VsVim,代码行数:42,代码来源:NormalModeIntegrationTest.cs

示例8: Create

 protected void Create(params string[] lines)
 {
     _statusUtil = new TestableStatusUtil();
     _vimData = Vim.VimData;
     _vimBufferData = CreateVimBufferData(
         CreateTextView(lines),
         statusUtil: _statusUtil);
     _vimBuffer = CreateVimBuffer(_vimBufferData);
     _vimTextBuffer = _vimBufferData.VimTextBuffer;
     _localSettings = _vimBufferData.LocalSettings;
     _globalSettings = _localSettings.GlobalSettings;
     _textBuffer = _vimBufferData.TextBuffer;
     _textView = _vimBufferData.TextView;
     _interpreter = new global::Vim.Interpreter.Interpreter(
         _vimBuffer,
         CommonOperationsFactory.GetCommonOperations(_vimBufferData),
         FoldManagerFactory.GetFoldManager(_vimBufferData.TextView),
         new FileSystem(),
         BufferTrackingService);
     _keyMap = Vim.KeyMap;
 }
开发者ID:ultonis,项目名称:VsVim,代码行数:21,代码来源:InterpreterTest.cs

示例9: OpenFakeVimBufferTestWindow

 protected void OpenFakeVimBufferTestWindow(params string[] lines)
 {
     _textView = CreateTextView(lines);
     _textView.MoveCaretTo(0);
     _textView.TextBuffer.Properties.AddProperty(Mock.MockVimHost.FileNameKey, "VimBufferTest.cs");
     _vimBufferData = CreateVimBufferData(_textView, statusUtil: _statusUtil);
     _vimBuffer = CreateVimBuffer(_vimBufferData);
     _vimBuffer.SwitchMode(ModeKind.Command, ModeArgument.None);
 }
开发者ID:jaredpar,项目名称:VsVim,代码行数:9,代码来源:VimBufferTest.cs


注:本文中的IVimBufferData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。