本文整理汇总了C#中IJumpList类的典型用法代码示例。如果您正苦于以下问题:C# IJumpList类的具体用法?C# IJumpList怎么用?C# IJumpList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IJumpList类属于命名空间,在下文中一共展示了IJumpList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OperationsImpl
internal OperationsImpl(ITextView view, IEditorOperations opts, IVimHost host, IJumpList jumpList)
: base(view, opts, host, jumpList)
{
}
开发者ID:ameent,项目名称:VsVim,代码行数:4,代码来源:Modes_CommonOperationsTest.cs
示例2: OperationsImpl
internal OperationsImpl(ITextView view, IEditorOperations opts, IOutliningManager outlining, IVimHost host, IJumpList jumpList, IVimLocalSettings settings, IUndoRedoOperations undoRedoOpts)
: base(view, opts, outlining, host, jumpList, settings, undoRedoOpts)
{
}
开发者ID:ChrisMarinos,项目名称:VsVim,代码行数:4,代码来源:CommonOperationsTest.cs
示例3: 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
示例4: CreateVimBuffer
public static Mock<IVimBuffer> CreateVimBuffer(
ITextView view,
string name = null,
IVim vim = null,
IJumpList jumpList = null,
IVimLocalSettings settings = null,
MockRepository factory = null)
{
factory = factory ?? new MockRepository(MockBehavior.Strict);
name = name ?? "test";
vim = vim ?? CreateVim().Object;
jumpList = jumpList ?? (factory.Create<IJumpList>().Object);
settings = settings ?? new LocalSettings(vim.Settings, view);
var mock = factory.Create<IVimBuffer>();
mock.SetupGet(x => x.TextView).Returns(view);
mock.SetupGet(x => x.TextBuffer).Returns(() => view.TextBuffer);
mock.SetupGet(x => x.TextSnapshot).Returns(() => view.TextSnapshot);
mock.SetupGet(x => x.Name).Returns(name);
mock.SetupGet(x => x.Settings).Returns(settings);
mock.SetupGet(x => x.MarkMap).Returns(vim.MarkMap);
mock.SetupGet(x => x.RegisterMap).Returns(vim.RegisterMap);
mock.SetupGet(x => x.JumpList).Returns(jumpList);
mock.SetupGet(x => x.Vim).Returns(vim);
return mock;
}
开发者ID:otf,项目名称:VsVim,代码行数:25,代码来源:MockObjectFactory.cs
示例5: 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(
ITextView textView,
IStatusUtil statusUtil = null,
IJumpList jumpList = null,
IUndoRedoOperations undoRedoOperations = null,
IVimWindowSettings windowSettings = null,
IWordUtil wordUtil = null)
{
return CreateVimBufferData(
Vim.GetOrCreateVimTextBuffer(textView.TextBuffer),
textView,
statusUtil,
jumpList,
undoRedoOperations,
windowSettings,
wordUtil);
}
开发者ID:cloudstrifegit,项目名称:VsVim,代码行数:21,代码来源:VimTestBase.cs
示例6: CreateVimBuffer
internal static Mock<IVimBuffer> CreateVimBuffer(
IWpfTextView view,
string name = null,
IVim vim = null,
IEditorOperations editorOperations = null,
IJumpList jumpList = null,
IVimLocalSettings settings = null)
{
name = name ?? "test";
vim = vim ?? CreateVim().Object;
editorOperations = editorOperations ?? CreateEditorOperations().Object;
jumpList = jumpList ?? (new Mock<IJumpList>(MockBehavior.Strict)).Object;
settings = settings ?? new LocalSettings(vim.Settings, view);
var mock = new Mock<IVimBuffer>(MockBehavior.Strict);
mock.SetupGet(x => x.TextView).Returns(view);
mock.SetupGet(x => x.TextBuffer).Returns(() => view.TextBuffer);
mock.SetupGet(x => x.TextSnapshot).Returns(() => view.TextSnapshot);
mock.SetupGet(x => x.Name).Returns(name);
mock.SetupGet(x => x.EditorOperations).Returns(editorOperations);
mock.SetupGet(x => x.VimHost).Returns(vim.Host);
mock.SetupGet(x => x.Settings).Returns(settings);
mock.SetupGet(x => x.MarkMap).Returns(vim.MarkMap);
mock.SetupGet(x => x.RegisterMap).Returns(vim.RegisterMap);
mock.SetupGet(x => x.JumpList).Returns(jumpList);
return mock;
}
开发者ID:ameent,项目名称:VsVim,代码行数:26,代码来源:MockObjectFactory.cs
示例7: CreateVimBuffer
public static Mock<IVimBuffer> CreateVimBuffer(
ITextView textView,
string name = null,
IVim vim = null,
IJumpList jumpList = null,
IVimLocalSettings localSettings = null,
IIncrementalSearch incrementalSearch = null,
IMotionUtil motionUtil = null,
ITextStructureNavigator wordNavigator = null,
MockRepository factory = null)
{
factory = factory ?? new MockRepository(MockBehavior.Strict);
name = name ?? "test";
vim = vim ?? CreateVim().Object;
jumpList = jumpList ?? (factory.Create<IJumpList>().Object);
motionUtil = motionUtil ?? factory.Create<IMotionUtil>().Object;
wordNavigator = wordNavigator ?? factory.Create<ITextStructureNavigator>().Object;
localSettings = localSettings ?? new LocalSettings(vim.GlobalSettings);
var vimTextBuffer = CreateVimTextBuffer(
textView.TextBuffer,
localSettings: localSettings,
vim: vim,
factory: factory);
var mock = factory.Create<IVimBuffer>();
mock.SetupGet(x => x.TextView).Returns(textView);
mock.SetupGet(x => x.MotionUtil).Returns(motionUtil);
mock.SetupGet(x => x.TextBuffer).Returns(() => textView.TextBuffer);
mock.SetupGet(x => x.TextSnapshot).Returns(() => textView.TextSnapshot);
mock.SetupGet(x => x.Name).Returns(name);
mock.SetupGet(x => x.LocalSettings).Returns(localSettings);
mock.SetupGet(x => x.GlobalSettings).Returns(localSettings.GlobalSettings);
mock.SetupGet(x => x.MarkMap).Returns(vim.MarkMap);
mock.SetupGet(x => x.RegisterMap).Returns(vim.RegisterMap);
mock.SetupGet(x => x.JumpList).Returns(jumpList);
mock.SetupGet(x => x.Vim).Returns(vim);
mock.SetupGet(x => x.VimData).Returns(vim.VimData);
mock.SetupGet(x => x.IncrementalSearch).Returns(incrementalSearch);
mock.SetupGet(x => x.WordNavigator).Returns(wordNavigator);
mock.SetupGet(x => x.VimTextBuffer).Returns(vimTextBuffer.Object);
return mock;
}
开发者ID:sehe,项目名称:VsVim,代码行数:41,代码来源:MockObjectFactory.cs
示例8: 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
示例9: Create
public void Create(params string[] lines)
{
_textBuffer = EditorUtil.CreateTextBuffer(lines);
_trackingLineColumnService = new TrackingLineColumnService();
_jumpListRaw = new JumpList(_trackingLineColumnService);
_jumpList = _jumpListRaw;
}
开发者ID:DanBlanchard,项目名称:VsVim,代码行数:7,代码来源:JumpListTest.cs
示例10: Create
private void Create(ITextView textView, IEditorOptions editorOptions = null)
{
_textView = textView;
_textBuffer = textView.TextBuffer;
_snapshot = _textBuffer.CurrentSnapshot;
_textBuffer.Changed += delegate { _snapshot = _textBuffer.CurrentSnapshot; };
_globalSettings = new Vim.GlobalSettings();
_localSettings = new LocalSettings(_globalSettings, FSharpOption.CreateForReference(editorOptions), FSharpOption.CreateForReference(textView));
_markMap = new MarkMap(new TrackingLineColumnService());
_vimData = new VimData();
_search = VimUtil.CreateSearchService(_globalSettings);
_jumpList = VimUtil.CreateJumpList();
_statusUtil = new Mock<IStatusUtil>(MockBehavior.Strict);
_navigator = VimUtil.CreateTextStructureNavigator(_textView, WordKind.NormalWord);
_motionUtil = new MotionUtil(
_textView,
_markMap,
_localSettings,
_search,
_navigator,
_jumpList,
_statusUtil.Object,
VimUtil.GetWordUtil(textView),
_vimData);
}
开发者ID:franch,项目名称:VsVim,代码行数:25,代码来源:MotionUtilTest.cs
示例11: Create
private void Create(ITextView textView)
{
_textView = textView;
_textBuffer = textView.TextBuffer;
_buffer = _textView.TextBuffer;
_snapshot = _buffer.CurrentSnapshot;
_buffer.Changed += delegate { _snapshot = _buffer.CurrentSnapshot; };
_globalSettings = new Vim.GlobalSettings();
_localSettings = new LocalSettings(_globalSettings, _textView);
_markMap = new MarkMap(new TrackingLineColumnService());
_vimData = new VimData();
_search = VimUtil.CreateSearchService(_globalSettings);
_jumpList = VimUtil.CreateJumpList();
_statusUtil = new Mock<IStatusUtil>(MockBehavior.Strict);
_navigator = VimUtil.CreateTextStructureNavigator(_textView.TextBuffer);
_motionUtil = new MotionUtil(
_textView,
_markMap,
_localSettings,
_search,
_navigator,
_jumpList,
_statusUtil.Object,
_vimData);
}
开发者ID:bentayloruk,项目名称:VsVim,代码行数:25,代码来源:MotionUtilTest.cs
示例12: Create
public void Create(params string[] lines)
{
var textView = CreateTextView(lines);
_textBuffer = textView.TextBuffer;
_bufferTrackingService = new BufferTrackingService();
_jumpListRaw = new JumpList(textView, _bufferTrackingService);
_jumpList = _jumpListRaw;
}
开发者ID:Kazark,项目名称:VsVim,代码行数:8,代码来源:JumpListTest.cs
示例13: 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
示例14: 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
示例15: Create
private void Create(params string[] lines)
{
_textView = EditorUtil.CreateView(lines);
_textBuffer = _textView.TextBuffer;
_factory = new MockRepository(MockBehavior.Loose);
_vimHost = _factory.Create<IVimHost>();
_statusUtil = _factory.Create<IStatusUtil>();
_operations = _factory.Create<ICommonOperations>();
_operations.Setup(x => x.EnsureCaretOnScreenAndTextExpanded());
_operations.Setup(x => x.RaiseSearchResultMessages(It.IsAny<SearchResult>()));
_operations.Setup(x => x.EditorOptions).Returns(EditorUtil.FactoryService.EditorOptionsFactory.GetOptions(_textView));
_recorder = _factory.Create<IMacroRecorder>(MockBehavior.Loose);
_smartIdentationService = _factory.Create<ISmartIndentationService>();
_vimData = new VimData();
_registerMap = VimUtil.CreateRegisterMap(MockObjectFactory.CreateClipboardDevice().Object);
_markMap = new MarkMap(new TrackingLineColumnService());
_globalSettings = new GlobalSettings();
_localSettings = new LocalSettings(_globalSettings, _textView);
var localSettings = new LocalSettings(new Vim.GlobalSettings());
_motionUtil = VimUtil.CreateTextViewMotionUtil(
_textView,
settings: localSettings,
vimData: _vimData);
_commandUtil = VimUtil.CreateCommandUtil(
_textView,
_operations.Object,
_motionUtil,
statusUtil: _statusUtil.Object,
localSettings: _localSettings,
registerMap: _registerMap,
markMap: _markMap,
vimData: _vimData,
smartIndentationService: _smartIdentationService.Object,
recorder: _recorder.Object);
_jumpList = _commandUtil._jumpList;
}
开发者ID:bentayloruk,项目名称:VsVim,代码行数:39,代码来源:CommandUtilTest.cs
示例16: 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
示例17: 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
示例18: Create
public void Create(params string[] lines)
{
var tuple = EditorUtil.CreateViewAndOperations(lines);
_textView = tuple.Item1;
_textBuffer = _textView.TextBuffer;
var service = EditorUtil.FactoryService;
_buffer = service.Vim.CreateBuffer(_textView);
_buffer.ErrorMessage +=
(_, message) =>
{
if (_assertOnErrorMessage)
{
Assert.Fail("Error Message: " + message);
}
};
_buffer.WarningMessage +=
(_, message) =>
{
if (_assertOnWarningMessage)
{
Assert.Fail("Warning Message: " + message);
}
};
_keyMap = _buffer.Vim.KeyMap;
_globalSettings = _buffer.Settings.GlobalSettings;
_jumpList = _buffer.JumpList;
}
开发者ID:bentayloruk,项目名称:VsVim,代码行数:27,代码来源:NormalModeIntegrationTest.cs
示例19: Create
private void Create(int limit = 100)
{
_tlcService = new Mock<ITrackingLineColumnService>(MockBehavior.Strict);
_jumpListRaw = new JumpList(_tlcService.Object, limit);
_jumpList = _jumpListRaw;
}
开发者ID:praveennet,项目名称:VsVim,代码行数:6,代码来源:JumpListTest.cs
示例20: Create
public void Create(params string[] lines)
{
var tuple = EditorUtil.CreateTextViewAndEditorOperations(lines);
_textView = tuple.Item1;
_textBuffer = _textView.TextBuffer;
var service = EditorUtil.FactoryService;
_vimBuffer = service.Vim.CreateVimBuffer(_textView);
_vimBuffer.ErrorMessage +=
(_, message) =>
{
if (_assertOnErrorMessage)
{
Assert.Fail("Error Message: " + message);
}
};
_vimBuffer.WarningMessage +=
(_, message) =>
{
if (_assertOnWarningMessage)
{
Assert.Fail("Warning Message: " + message);
}
};
_vimTextBuffer = _vimBuffer.VimTextBuffer;
_keyMap = _vimBuffer.Vim.KeyMap;
_globalSettings = _vimBuffer.LocalSettings.GlobalSettings;
_jumpList = _vimBuffer.JumpList;
_vimHost = (MockVimHost)_vimBuffer.Vim.VimHost;
_vimHost.BeepCount = 0;
_vimData = service.Vim.VimData;
_foldManager = EditorUtil.FactoryService.FoldManagerFactory.GetFoldManager(_textView);
// 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.IsTrue(_textView.VisualSnapshot is IElisionSnapshot);
Assert.IsTrue(_textView.VisualSnapshot != _textView.TextSnapshot);
}
开发者ID:GunioRobot,项目名称:VsVim,代码行数:39,代码来源:NormalModeIntegrationTest.cs
注:本文中的IJumpList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论