本文整理汇总了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);
}
示例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);
}
示例3: CreateCommonOperations
internal virtual ICommonOperations CreateCommonOperations(IVimBufferData vimBufferData)
{
return CommonOperationsFactory.GetCommonOperations(vimBufferData);
}
示例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);
}
示例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();
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}