protected CommandMarginControllerTest() { _factory = new MockRepository(MockBehavior.Strict); _marginControl = new CommandMarginControl(); _marginControl.CommandLineTextBox.Text = String.Empty; _search = _factory.Create<IIncrementalSearch>(); _search.SetupGet(x => x.InSearch).Returns(false); _search.SetupGet(x => x.InPasteWait).Returns(false); _vimBuffer = new MockVimBuffer(); _vimBuffer.IncrementalSearchImpl = _search.Object; _vimBuffer.VimImpl = MockObjectFactory.CreateVim(factory: _factory).Object; _vimBuffer.CommandModeImpl = _factory.Create<ICommandMode>(MockBehavior.Loose).Object; var textBuffer = CreateTextBuffer(new []{""}); _vimBuffer.TextViewImpl = TextEditorFactoryService.CreateTextView(textBuffer); Mock<IVimGlobalSettings> globalSettings = new Mock<IVimGlobalSettings>(); _vimBuffer.GlobalSettingsImpl = globalSettings.Object; var editorFormatMap = _factory.Create<IEditorFormatMap>(MockBehavior.Loose); editorFormatMap.Setup(x => x.GetProperties(It.IsAny<string>())).Returns(new ResourceDictionary()); var parentVisualElement = _factory.Create<FrameworkElement>(); _controller = new CommandMarginController( _vimBuffer, parentVisualElement.Object, _marginControl, VimEditorHost.EditorFormatMapService.GetEditorFormatMap(_vimBuffer.TextView), VimEditorHost.ClassificationFormatMapService.GetClassificationFormatMap(_vimBuffer.TextView)); }
protected CommandMarginControllerTest() { _factory = new MockRepository(MockBehavior.Strict); _marginControl = new CommandMarginControl(); _marginControl.StatusLine = String.Empty; var vimBuffer = CreateVimBuffer(); var editorFormatMap = _factory.Create<IEditorFormatMap>(MockBehavior.Loose); editorFormatMap.Setup(x => x.GetProperties(It.IsAny<string>())).Returns(new ResourceDictionary()); var parentVisualElement = _factory.Create<FrameworkElement>(); _controller = new CommandMarginController( vimBuffer, parentVisualElement.Object, _marginControl, editorFormatMap.Object, new List<Lazy<IOptionsProviderFactory>>()); }
protected virtual void Create(params string[] lines) { _factory = new MockRepository(MockBehavior.Strict); _marginControl = new CommandMarginControl(); _marginControl.CommandLineTextBox.Text = String.Empty; _vimBuffer = CreateVimBuffer(lines); _textBuffer = _vimBuffer.TextBuffer; _textView = _vimBuffer.TextView; _keyboardDevice = new MockKeyboardDevice(); var parentVisualElement = _factory.Create<FrameworkElement>(); _controller = new CommandMarginController( _vimBuffer, parentVisualElement.Object, _marginControl, VimEditorHost.EditorFormatMapService.GetEditorFormatMap(_vimBuffer.TextView), VimEditorHost.ClassificationFormatMapService.GetClassificationFormatMap(_vimBuffer.TextView)); }
public CommandMarginControllerTest() { _factory = new MockRepository(MockBehavior.Strict); _search = _factory.Create<IIncrementalSearch>(); _search.SetupGet(x => x.InSearch).Returns(false); _vimBuffer = new MockVimBuffer(); _vimBuffer.IncrementalSearchImpl = _search.Object; _vimBuffer.VimImpl = MockObjectFactory.CreateVim(factory: _factory).Object; _marginControl = new CommandMarginControl(); _marginControl.StatusLine = String.Empty; var editorFormatMap = _factory.Create<IEditorFormatMap>(MockBehavior.Loose); editorFormatMap.Setup(x => x.GetProperties(It.IsAny<string>())).Returns(new ResourceDictionary()); _controller = new CommandMarginController( _vimBuffer, _marginControl, editorFormatMap.Object, new List<Lazy<IOptionsProviderFactory>>()); }
public CommandMargin( FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IClassificationFormatMap classificationFormatMap, ICommonOperations commonOperations, IClipboardDevice clipboardDevice, bool isFirstCommandMargin) { _controller = new CommandMarginController( buffer, parentVisualElement, _margin, editorFormatMap, classificationFormatMap, commonOperations, clipboardDevice, isFirstCommandMargin); _enabled = true; }
protected virtual void Create(params string[] lines) { _factory = new MockRepository(MockBehavior.Strict); _marginControl = new CommandMarginControl(); _marginControl.StatusLine = String.Empty; _vimBuffer = CreateVimBuffer(lines); _textBuffer = _vimBuffer.TextBuffer; _textView = _vimBuffer.TextView; _keyboardDevice = new MockKeyboardDevice(); var editorFormatMap = _factory.Create<IEditorFormatMap>(MockBehavior.Loose); editorFormatMap.Setup(x => x.GetProperties(It.IsAny<string>())).Returns(new ResourceDictionary()); var parentVisualElement = _factory.Create<FrameworkElement>(); _controller = new CommandMarginController( _vimBuffer, parentVisualElement.Object, _marginControl, editorFormatMap.Object, new List<Lazy<IOptionsProviderFactory>>()); }
public CommandMargin(FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IClassificationFormatMap classificationFormatMap) { _margin.CommandLineTextBox.Text = "Welcome to Vim"; _controller = new CommandMarginController(buffer, parentVisualElement, _margin, editorFormatMap, classificationFormatMap); }
public CommandMargin(FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IFontProperties fontProperties, IEnumerable<Lazy<IOptionsProviderFactory>> optionsProviderFactories) { _margin.StatusLine = "Welcome to Vim"; _controller = new CommandMarginController(buffer, parentVisualElement, _margin, editorFormatMap, fontProperties, optionsProviderFactories); }
public CommandMargin(FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IClassificationFormatMap classificationFormatMap, ICommonOperations commonOperations, IClipboardDevice clipboardDevice, bool isFirstCommandMargin) { _margin.CommandLineTextBox.Text = isFirstCommandMargin ? $"Welcome to VsVim Version {VimConstants.VersionNumber}" : string.Empty; _controller = new CommandMarginController(buffer, parentVisualElement, _margin, editorFormatMap, classificationFormatMap, commonOperations, clipboardDevice); _enabled = true; }
public CommandMargin(FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IFontProperties fontProperties, IEnumerable <Lazy <IOptionsProviderFactory> > optionsProviderFactories) { _margin.StatusLine = "Welcome to Vim"; _controller = new CommandMarginController(buffer, parentVisualElement, _margin, editorFormatMap, fontProperties, optionsProviderFactories); }
public CommandMargin(FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IFontProperties fontProperties) { _margin.StatusLine = "Welcome to Vim"; _controller = new CommandMarginController(buffer, parentVisualElement, _margin, editorFormatMap, fontProperties); }
public CommandMargin(FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IClassificationFormatMap classificationFormatMap) { _margin.CommandLineTextBox.Text = "Welcome to Vim"; _controller = new CommandMarginController(buffer, parentVisualElement, _margin, editorFormatMap, classificationFormatMap); _enabled = true; }
public CommandMargin(IVimBuffer buffer, IEditorFormatMap editorFormatMap, IEnumerable<Lazy<IOptionsProviderFactory>> optionsProviderFactories) { _margin.StatusLine = "Welcome to Vim"; _controller = new CommandMarginController(buffer, _margin, editorFormatMap, optionsProviderFactories); }
public CommandMargin(IVimBuffer buffer, IEditorFormatMap editorFormatMap, IEnumerable <Lazy <IOptionsProviderFactory> > optionsProviderFactories) { _margin.StatusLine = "Welcome to Vim"; _controller = new CommandMarginController(buffer, _margin, editorFormatMap, optionsProviderFactories); }
public CommandMargin(FrameworkElement parentVisualElement, IVimBuffer buffer, IEditorFormatMap editorFormatMap, IClassificationFormatMap classificationFormatMap, ICommonOperations commonOperations, IClipboardDevice clipboardDevice) { _margin.CommandLineTextBox.Text = "Welcome to Vim"; _controller = new CommandMarginController(buffer, parentVisualElement, _margin, editorFormatMap, classificationFormatMap, commonOperations, clipboardDevice); _enabled = true; }