/// <summary> /// Create the IVimBuffer with the given set of lines. Note that we intentionally don't /// set the mode to Insert here because the given commands should work irrespective of the /// mode /// </summary> /// <param name="lines"></param> private void Create(params string[] lines) { _textView = CreateTextView(lines); _buffer = Vim.CreateVimBuffer(_textView); _globalSettings = _buffer.GlobalSettings; _localSettings = _buffer.LocalSettings; var operations = CommonOperationsFactory.GetCommonOperations(_buffer.VimBufferData); _insertUtilRaw = new InsertUtil(_buffer.VimBufferData, operations); _insertUtil = _insertUtilRaw; }
/// <summary> /// Create the IVimBuffer with the given set of lines. Note that we intentionally don't /// set the mode to Insert here because the given commands should work irrespective of the /// mode /// </summary> /// <param name="lines"></param> private void Create(params string[] lines) { _textView = CreateTextView(lines); _textBuffer = _textView.TextBuffer; _vimBuffer = Vim.CreateVimBuffer(_textView); _globalSettings = _vimBuffer.GlobalSettings; _localSettings = _vimBuffer.LocalSettings; var operations = CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData); _insertUtilRaw = new InsertUtil(_vimBuffer.VimBufferData, operations); _insertUtil = _insertUtilRaw; }
/// <summary> /// Create the IVimBuffer with the given set of lines. Note that we intentionally don't /// set the mode to Insert here because the given commands should work irrespective of the /// mode. There are a few tests that rely on behavior from SelectionChangeTracker so they set /// the mode to Insert. /// </summary> /// <param name="lines"></param> protected virtual void Create(params string[] lines) { _textView = CreateTextView(lines); _textBuffer = _textView.TextBuffer; _vimBuffer = Vim.CreateVimBuffer(_textView); _globalSettings = _vimBuffer.GlobalSettings; _localSettings = _vimBuffer.LocalSettings; var operations = CommonOperationsFactory.GetCommonOperations(_vimBuffer.VimBufferData); var motionUtil = new MotionUtil(_vimBuffer.VimBufferData, operations); _insertUtilRaw = new InsertUtil(_vimBuffer.VimBufferData, motionUtil, operations); _insertUtil = _insertUtilRaw; }
public static CommandUtil CreateCommandUtil( VimBufferData vimBufferData, IMotionUtil motionUtil = null, ICommonOperations operations = null, IFoldManager foldManager = null, InsertUtil insertUtil = null) { motionUtil = motionUtil ?? new MotionUtil(vimBufferData); operations = operations ?? EditorUtil.FactoryService.CommonOperationsFactory.GetCommonOperations(vimBufferData); foldManager = foldManager ?? CreateFoldManager(vimBufferData.TextView, vimBufferData.StatusUtil); insertUtil = insertUtil ?? new InsertUtil(vimBufferData, operations); return(new CommandUtil( vimBufferData, motionUtil, operations, foldManager, insertUtil)); }
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)); }
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); }
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); }
/// <summary> /// Create the IVimBuffer with the given set of lines. Note that we intentionally don't /// set the mode to Insert here because the given commands should work irrespective of the /// mode /// </summary> /// <param name="lines"></param> private void Create(params string[] lines) { _textView = EditorUtil.CreateTextView(lines); _buffer = EditorUtil.FactoryService.Vim.CreateVimBuffer(_textView); _globalSettings = _buffer.GlobalSettings; _localSettings = _buffer.LocalSettings; var operations = EditorUtil.FactoryService.CommonOperationsFactory.GetCommonOperations(_buffer.VimBufferData); _insertUtilRaw = new InsertUtil(_buffer.VimBufferData, operations); _insertUtil = _insertUtilRaw; }