本文整理汇总了C#中IVimWindowSettings类的典型用法代码示例。如果您正苦于以下问题:C# IVimWindowSettings类的具体用法?C# IVimWindowSettings怎么用?C# IVimWindowSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IVimWindowSettings类属于命名空间,在下文中一共展示了IVimWindowSettings类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1:
void IVimHost.VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
{
VimRcState = vimRcState;
}
示例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);
}
示例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);
}
示例4: VimRcLoaded
public virtual void VimRcLoaded(VimRcState vimRcState, IVimLocalSettings localSettings, IVimWindowSettings windowSettings)
{
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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));
}
示例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);
}