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


C# IVimWindowSettings类代码示例

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


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

示例1:

 void IVimHost.VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
 {
     VimRcState = vimRcState;
 }
开发者ID:niklasi,项目名称:VsVim,代码行数:4,代码来源:MockVimHost.cs

示例2: CreateVimBufferData

 /// <summary>
 /// This is not technically a Mock but often we want to create it with mocked 
 /// backing values
 /// </summary>
 /// <returns></returns>
 public static VimBufferData CreateVimBufferData(
     IVimTextBuffer vimTextBuffer,
     ITextView textView,
     IJumpList jumpList = null,
     IStatusUtil statusUtil = null,
     IUndoRedoOperations undoRedoOperations = null,
     IVimWindowSettings windowSettings = null,
     IWordUtil wordUtil = null,
     MockRepository factory = null)
 {
     factory = factory ?? new MockRepository(MockBehavior.Strict);
     statusUtil = statusUtil ?? factory.Create<IStatusUtil>().Object;
     undoRedoOperations = undoRedoOperations ?? factory.Create<IUndoRedoOperations>().Object;
     jumpList = jumpList ?? factory.Create<IJumpList>().Object;
     wordUtil = wordUtil ?? factory.Create<IWordUtil>().Object;
     windowSettings = windowSettings ?? factory.Create<IVimWindowSettings>().Object;
     return new VimBufferData(
         jumpList,
         textView,
         statusUtil,
         undoRedoOperations,
         vimTextBuffer,
         windowSettings,
         wordUtil);
 }
开发者ID:sehe,项目名称:VsVim,代码行数:30,代码来源:MockObjectFactory.cs

示例3: CreateVimBufferData

 /// <summary>
 /// Create a new instance of VimBufferData.  Centralized here to make it easier to 
 /// absorb API changes in the Unit Tests
 /// </summary>
 protected IVimBufferData CreateVimBufferData(
     IVimTextBuffer vimTextBuffer,
     ITextView textView,
     IStatusUtil statusUtil = null,
     IJumpList jumpList = null,
     IUndoRedoOperations undoRedoOperations = null,
     IVimWindowSettings windowSettings = null,
     IWordUtil wordUtil = null)
 {
     jumpList = jumpList ?? new JumpList(textView, _bufferTrackingService);
     statusUtil = statusUtil ?? new StatusUtil();
     undoRedoOperations = undoRedoOperations ?? CreateUndoRedoOperations(statusUtil);
     windowSettings = windowSettings ?? new WindowSettings(vimTextBuffer.GlobalSettings);
     wordUtil = wordUtil ?? WordUtilFactory.GetWordUtil(vimTextBuffer.TextBuffer);
     return new VimBufferData(
         vimTextBuffer,
         textView,
         windowSettings,
         jumpList,
         statusUtil,
         undoRedoOperations,
         wordUtil);
 }
开发者ID:cloudstrifegit,项目名称:VsVim,代码行数:27,代码来源:VimTestBase.cs

示例4: VimRcLoaded

 public virtual void VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
 {
 }
开发者ID:nligerakis,项目名称:VsVim,代码行数:3,代码来源:VimHost.cs

示例5: VimRcLoaded

 public override void VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
 {
     if (vimRcState.IsLoadFailed)
     {
         // If we failed to load a vimrc file then we should add a couple of sanity
         // settings.  Otherwise the Visual Studio experience wont't be what users expect
         localSettings.AutoIndent = true;
     }
 }
开发者ID:honeyhoneywell,项目名称:VsVim,代码行数:9,代码来源:VsVimHost.cs

示例6: CreateVimBufferData

 /// <summary>
 /// Create a new instance of VimBufferData.  Centralized here to make it easier to 
 /// absorb API changes in the Unit Tests
 /// </summary>
 protected IVimBufferData CreateVimBufferData(
     IVimTextBuffer vimTextBuffer,
     ITextView textView,
     IStatusUtil statusUtil = null,
     IJumpList jumpList = null,
     IVimWindowSettings windowSettings = null,
     IWordUtil wordUtil = null)
 {
     jumpList = jumpList ?? new JumpList(textView, BufferTrackingService);
     statusUtil = statusUtil ?? new StatusUtil();
     windowSettings = windowSettings ?? new WindowSettings(vimTextBuffer.GlobalSettings);
     wordUtil = wordUtil ?? WordUtil;
     return new VimBufferData(
         vimTextBuffer,
         textView,
         windowSettings,
         jumpList,
         statusUtil,
         wordUtil);
 }
开发者ID:Deleriumdoll,项目名称:VsVim,代码行数:24,代码来源:VimTestBase.cs

示例7: EditorToSettingSynchronizerTest

        public EditorToSettingSynchronizerTest()
        {
            _synchronizer = new EditorToSettingSynchronizer();

            var textView = CreateTextView();
            var globalSettings = new GlobalSettings();
            _localSettings = new LocalSettings(globalSettings);
            _windowSettings = new WindowSettings(globalSettings);
            _editorOptions = textView.Options;
            _vimBuffer = new Mock<IVimBuffer>(MockBehavior.Strict);
            _vimBuffer.SetupGet(x => x.LocalSettings).Returns(_localSettings);
            _vimBuffer.SetupGet(x => x.WindowSettings).Returns(_windowSettings);
            _vimBuffer.SetupGet(x => x.TextView).Returns(textView);
        }
开发者ID:kun-liu,项目名称:VsVim,代码行数:14,代码来源:EditorToSettingSynchronizerTest.cs

示例8: 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

示例9: Create

        protected void Create(params string[] lines)
        {
            _vimHost = (MockVimHost)Vim.VimHost;
            _textView = CreateTextView(lines);
            _textBuffer = _textView.TextBuffer;
            _vimTextBuffer = CreateVimTextBufferCore(_textBuffer);
            _localSettings = _vimTextBuffer.LocalSettings;

            var foldManager = CreateFoldManager(_textView);

            _factory = new MockRepository(MockBehavior.Loose);
            _statusUtil = _factory.Create<IStatusUtil>();
            _bulkOperations = new TestableBulkOperations();

            var vimBufferData = CreateVimBufferData(
                _vimTextBuffer,
                _textView,
                statusUtil: _statusUtil.Object);
            _jumpList = vimBufferData.JumpList;
            _windowSettings = vimBufferData.WindowSettings;

            _vimData = Vim.VimData;
            _macroRecorder = Vim.MacroRecorder;
            _globalSettings = Vim.GlobalSettings;

            var operations = CreateCommonOperations(vimBufferData);
            var lineChangeTracker = new LineChangeTracker(vimBufferData);
            _motionUtil = new MotionUtil(vimBufferData, operations);
            _commandUtil = new CommandUtil(
                vimBufferData,
                _motionUtil,
                operations,
                foldManager,
                new InsertUtil(vimBufferData, _motionUtil, operations),
                _bulkOperations,
                MouseDevice,
                lineChangeTracker);

            var outliningManagerService = CompositionContainer.GetExportedValue<IOutliningManagerService>();
            _outliningManager = outliningManagerService.GetOutliningManager(_textView);
        }
开发者ID:Yzzl,项目名称:VsVim,代码行数:41,代码来源:CommandUtilTest.cs

示例10: Create

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

示例11: Create

        private void Create(params string[] lines)
        {
            _vimHost = (MockVimHost)Vim.VimHost;
            _textView = CreateTextView(lines);
            _textBuffer = _textView.TextBuffer;
            _vimTextBuffer = Vim.CreateVimTextBuffer(_textBuffer);
            _localSettings = _vimTextBuffer.LocalSettings;

            _foldManager = FoldManagerFactory.GetFoldManager(_textView);

            _factory = new MockRepository(MockBehavior.Loose);
            _statusUtil = _factory.Create<IStatusUtil>();
            _smartIdentationService = _factory.Create<ISmartIndentationService>();

            var vimBufferData = CreateVimBufferData(
                _vimTextBuffer,
                _textView,
                statusUtil: _statusUtil.Object);
            _jumpList = vimBufferData.JumpList;
            _windowSettings = vimBufferData.WindowSettings;

            _vimData = Vim.VimData;
            _macroRecorder = Vim.MacroRecorder;
            _registerMap = Vim.RegisterMap;
            _globalSettings = Vim.GlobalSettings;

            var operations = CommonOperationsFactory.GetCommonOperations(vimBufferData);
            _motionUtil = new MotionUtil(vimBufferData);
            _commandUtil = new CommandUtil(
                vimBufferData,
                _motionUtil,
                operations,
                _smartIdentationService.Object,
                _foldManager,
                new InsertUtil(vimBufferData, operations));
        }
开发者ID:philipmat,项目名称:VsVim,代码行数:36,代码来源:CommandUtilTest.cs

示例12: Create

        protected void Create(params string[] lines)
        {
            _vimHost = (MockVimHost)Vim.VimHost;
            _textView = CreateTextView(lines);
            _textBuffer = _textView.TextBuffer;
            _vimTextBuffer = Vim.CreateVimTextBuffer(_textBuffer);
            _localSettings = _vimTextBuffer.LocalSettings;

            var foldManager = CreateFoldManager(_textView);

            _factory = new MockRepository(MockBehavior.Loose);
            _statusUtil = _factory.Create<IStatusUtil>();
            _bulkOperations = new TestableBulkOperations();

            var vimBufferData = CreateVimBufferData(
                _vimTextBuffer,
                _textView,
                statusUtil: _statusUtil.Object);
            _jumpList = vimBufferData.JumpList;
            _windowSettings = vimBufferData.WindowSettings;

            _vimData = Vim.VimData;
            _macroRecorder = Vim.MacroRecorder;
            _globalSettings = Vim.GlobalSettings;

            var operations = CommonOperationsFactory.GetCommonOperations(vimBufferData);
            _motionUtil = new MotionUtil(vimBufferData);
            _commandUtil = new CommandUtil(
                vimBufferData,
                _motionUtil,
                operations,
                foldManager,
                new InsertUtil(vimBufferData, operations),
                _bulkOperations);
        }
开发者ID:jakubwojciech,项目名称:VsVim,代码行数:35,代码来源:CommandUtilTest.cs


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