本文整理汇总了C#中IJumpList类的典型用法代码示例。如果您正苦于以下问题:C# IJumpList类的具体用法?C# IJumpList怎么用?C# IJumpList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IJumpList类属于命名空间,在下文中一共展示了IJumpList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OperationsImpl
internal OperationsImpl(ITextView view, IEditorOperations opts, IVimHost host, IJumpList jumpList)
: base(view, opts, host, jumpList)
{
}
示例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)
{
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例9: Create
public void Create(params string[] lines)
{
_textBuffer = EditorUtil.CreateTextBuffer(lines);
_trackingLineColumnService = new TrackingLineColumnService();
_jumpListRaw = new JumpList(_trackingLineColumnService);
_jumpList = _jumpListRaw;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}