internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, IVimProtectedOperations protectedOperations) { _keyBindingService = keyBindingService; _serviceProvider = provider; _vimApplicationSettings = vimApplicationSettings; _protectedOperations = protectedOperations; }
internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IVimApplicationSettings vimApplicationSettings, IToastNotificationServiceProvider toastNotificationServiceProvider) { _vim = vim; _keyBindingService = keyBindingService; _vimApplicationSettings = vimApplicationSettings; _toastNotificationServiceProvider = toastNotificationServiceProvider; }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IResharperUtil resharperUtil, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, IVsAdapter adapter, IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _resharperUtil = resharperUtil; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _vim.AutoLoadVimRc = false; }
internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService, ILegacySettings legacySettings) { _vim = vim; _keyBindingService = keyBindingService; _formatMapService = formatMapService; _legacySettings = legacySettings; }
internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations) { _keyBindingService = keyBindingService; _serviceProvider = serviceProvider; _vimApplicationSettings = vimApplicationSettings; _protectedOperations = protectedOperations; }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IExternalEditorManager externalEditorManager, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, IVsAdapter adapter, IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _externalEditorManager = externalEditorManager; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IResharperUtil resharperUtil, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, ITextManager textManager, IVsAdapter adapter, [EditorUtilsImport] IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _resharperUtil = resharperUtil; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _textManager = textManager; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif }
private void Create(params string[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); _commandsSnapshot = new CommandsSnapshot(_dte.Object); var sp = MockObjectFactory.CreateVsServiceProvider( Tuple.Create(typeof(SDTE), (object)(_dte.Object)), Tuple.Create(typeof(SVsShell), (object)(new Mock <IVsShell>(MockBehavior.Strict)).Object)); _optionsDialogService = new Mock <IOptionsDialogService>(MockBehavior.Strict); _vimApplicationSettings = new Mock <IVimApplicationSettings>(MockBehavior.Strict); _vimApplicationSettings.SetupGet(x => x.IgnoredConflictingKeyBinding).Returns(false); _vimApplicationSettings.SetupGet(x => x.HaveUpdatedKeyBindings).Returns(false); var list = new List <CommandKeyBinding>(); _vimApplicationSettings.SetupGet(x => x.RemovedBindings).Returns(list.AsReadOnly()); _serviceRaw = new KeyBindingService( sp.Object, _optionsDialogService.Object, new Mock <IProtectedOperations>().Object, _vimApplicationSettings.Object); _service = _serviceRaw; var result = _dte.Object.Commands.Count; }
internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService, IVimApplicationSettings vimApplicationSettings) { _vim = vim; _keyBindingService = keyBindingService; _formatMapService = formatMapService; _vimApplicationSettings = vimApplicationSettings; }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IResharperUtil resharperUtil, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, IVsAdapter adapter, [EditorUtilsImport] IProtectedOperations protectedOperations, IVimBufferCoordinatorFactory bufferCoordinatorFactory, IKeyUtil keyUtil) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _resharperUtil = resharperUtil; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _adapter = adapter; _protectedOperations = protectedOperations; _bufferCoordinatorFactory = bufferCoordinatorFactory; _keyUtil = keyUtil; _vim.AutoLoadVimRc = false; #if DEBUG VimTrace.TraceSwitch.Level = TraceLevel.Info; #endif }
private void Create(params string[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); var sp = MockObjectFactory.CreateVsServiceProvider(Tuple.Create(typeof(SDTE), (object)(_dte.Object))); _optionsDialogService = new Mock <IOptionsDialogService>(MockBehavior.Strict); _serviceRaw = new KeyBindingService(sp.Object, _optionsDialogService.Object); _service = _serviceRaw; }
/// <summary> /// De-register the bindings from the Design Surface /// </summary> public void End() { IKeyBindingService kbs = _surface.DesignContext.Services.GetService(typeof(IKeyBindingService)) as IKeyBindingService; if (kbs != null) { kbs.DeregisterBinding(_tabBinding); kbs.DeregisterBinding(_shiftTabBinding); } }
internal ConflictingKeyBindingMargin(IKeyBindingService service, IEditorFormatMap formatMap) { _keyBindingService = service; _control = new ConflictingKeyBindingMarginControl(); _control.Background = GetBackgroundColor(formatMap); _control.ConfigureClick += OnConfigureClick; _control.IgnoreClick += OnIgnoreClick; _keyBindingService.ConflictingKeyBindingStateChanged += OnStateChanged; OnStateChanged(this, EventArgs.Empty); }
internal ConflictingKeyBindingMargin(IKeyBindingService service, IVimApplicationSettings vimApplicationSettings, IToastNotificationService toastNotificationService) { _keyBindingService = service; _vimApplicationSettings = vimApplicationSettings; _control = new ConflictingKeyBindingMarginControl(); _control.ConfigureClick += OnConfigureClick; _keyBindingService.ConflictingKeyBindingStateChanged += OnStateChanged; _toastNotificationService = toastNotificationService; _toastNotificationService.TextView.Closed += OnTextViewClosed; OnStateChanged(this, EventArgs.Empty); }
public KeyboardSettingsControl(IVim vim, IKeyBindingService keyBindingService, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations) { InitializeComponent(); _vim = vim; _keyBindingService = keyBindingService; _vimApplicationSettings = vimApplicationSettings; _protectedOperations = protectedOperations; IncludeAllScopes = keyBindingService.IncludeAllScopes; BindingsListBox.Items.SortDescriptions.Add(new SortDescription("KeyName", ListSortDirection.Ascending)); ComputeKeyBindings(); }
internal ConflictingKeyBindingMargin(IKeyBindingService service, IEditorFormatMap formatMap, ILegacySettings legacySettings) { _keyBindingService = service; _legacySettings = legacySettings; _control = new ConflictingKeyBindingMarginControl(); _control.Background = formatMap.GetBackgroundBrush(EditorFormatDefinitionNames.Margin, MarginFormatDefinition.DefaultColor); _control.ConfigureClick += OnConfigureClick; _control.IgnoreClick += OnIgnoreClick; _keyBindingService.ConflictingKeyBindingStateChanged += OnStateChanged; OnStateChanged(this, EventArgs.Empty); }
private CommandKeyBindingSnapshot GetCommandKeyBindingSnapshot(IVim vim, IKeyBindingService keyBindingService) { var textView = vim.VimHost.CreateHiddenTextView(); try { var vimBuffer = vim.CreateVimBuffer(textView); return keyBindingService.CreateCommandKeyBindingSnapshot(vimBuffer); } finally { textView.Close(); } }
internal ConflictingKeyBindingMargin(IKeyBindingService service, IEditorFormatMap formatMap, IVimApplicationSettings vimApplicationSettings) { _keyBindingService = service; _vimApplicationSettings = vimApplicationSettings; _control = new ConflictingKeyBindingMarginControl(); _control.Background = formatMap.GetBackgroundBrush(EditorFormatDefinitionNames.Margin, MarginFormatDefinition.DefaultColor); _control.ConfigureClick += OnConfigureClick; _control.IgnoreClick += OnIgnoreClick; _keyBindingService.ConflictingKeyBindingStateChanged += OnStateChanged; OnStateChanged(this, EventArgs.Empty); }
/// <summary> /// Starts the navigator on the Design surface and add bindings. /// </summary> public void Start() { var tabFocus = new RelayCommand(this.MoveFocusForward, this.CanMoveFocusForward); var shiftTabFocus = new RelayCommand(this.MoveFocusBack, this.CanMoveFocusBack); _tabBinding = new KeyBinding(tabFocus, new KeyGesture(Key.Tab)); _shiftTabBinding = new KeyBinding(shiftTabFocus, new KeyGesture(Key.Tab, ModifierKeys.Shift)); IKeyBindingService kbs = _surface.DesignContext.Services.GetService(typeof(IKeyBindingService)) as IKeyBindingService; if (kbs != null) { kbs.RegisterBinding(_tabBinding); kbs.RegisterBinding(_shiftTabBinding); } }
/// <summary> /// Starts the navigator on the Design surface and add bindings. /// </summary> public void Start() { DesignCommand tabFocus = new DesignCommand(parameter => this.MoveFocusForward(_surface), parameter => CanMoveFocusForward(_surface)); DesignCommand shiftTabFocus = new DesignCommand(parameter => this.MoveFocusBack(_surface), parameter => this.CanMoveFocusBack(_surface)); _tabBinding = new KeyBinding(tabFocus, new KeyGesture(Key.Tab)); _shiftTabBinding = new KeyBinding(shiftTabFocus, new KeyGesture(Key.Tab, ModifierKeys.Shift)); IKeyBindingService kbs = _surface.DesignContext.Services.GetService(typeof(IKeyBindingService)) as IKeyBindingService; if (kbs != null) { kbs.RegisterBinding(_tabBinding); kbs.RegisterBinding(_shiftTabBinding); } }
private void Create(params string[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); _commandsSnapshot = new CommandsSnapshot(_dte.Object); var sp = MockObjectFactory.CreateVsServiceProvider( Tuple.Create(typeof(SDTE), (object)(_dte.Object)), Tuple.Create(typeof(SVsShell), (object)(new Mock <IVsShell>(MockBehavior.Strict)).Object)); _optionsDialogService = new Mock <IOptionsDialogService>(MockBehavior.Strict); _serviceRaw = new KeyBindingService( sp.Object, _optionsDialogService.Object, new Mock <IProtectedOperations>().Object, new Mock <ILegacySettings>().Object); _service = _serviceRaw; }
public LayoutProvider( IExtensionRegistry extensionRegistry, IIconResourceService iconResourceService, IPartRegistry partRegistry, IStatusService statusService, IObjectBuilderService objectBuilder, IKeyBindingService keyBindingService) { m_ExtensionRegistry = extensionRegistry; m_IconResourceService = iconResourceService; m_PartRegistry = partRegistry; m_StatusService = statusService; m_ObjectBuilder = objectBuilder; m_KeyBindingService = keyBindingService; m_ActiveToolStrips = new Dictionary <IWorkbenchPart, ToolStrip>(); }
public HostFactory( IVim vim, ITextEditorFactoryService editorFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IVimHost host, IFileSystem fileSystem) { _vim = vim; _keyBindingService = keyBindingService; _editorFactoryService = editorFactoryService; _serviceProvider = serviceProvider; _adaptersFactory = adaptersFactory; _host = host; _fileSystem = fileSystem; }
public ContentWidget(IViewPart viewPart, IIconResourceService iconResourceService, IKeyBindingService keyBindingService, bool lazy) { InitializeComponent(); m_ViewPart = viewPart; m_IconResourceService = iconResourceService; m_KeyBindingService = keyBindingService; Text = viewPart.Name; Name = viewPart.Id; //if (!string.IsNullOrEmpty(viewPart.IconId)) //{ // Icon = m_IconResourceService.GetIcon(viewPart.IconId); // ShowIcon = true; //} if (!lazy) { CreateAndApplyViewControl(); } KeyDown += HandleKeyInput; //Closing += ViewPart_Closing; }
protected virtual void Create(params EnvDTE.Command[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); _commandListSnapshot = new CommandListSnapshot(_dte.Object); _optionsDialogService = new Mock<IOptionsDialogService>(MockBehavior.Strict); _vimApplicationSettings = new Mock<IVimApplicationSettings>(MockBehavior.Strict); _vimApplicationSettings.SetupProperty(x => x.IgnoredConflictingKeyBinding, false); _vimApplicationSettings.SetupProperty(x => x.HaveUpdatedKeyBindings, false); _vimApplicationSettings.SetupProperty(x => x.KeyMappingIssueFixed, true); var list = new List<CommandKeyBinding>(); _vimApplicationSettings.SetupGet(x => x.RemovedBindings).Returns(list.AsReadOnly()); _serviceRaw = new KeyBindingService( _dte.Object, _optionsDialogService.Object, new Mock<IVimProtectedOperations>().Object, _vimApplicationSettings.Object, ScopeData.Default); _service = _serviceRaw; var result = _dte.Object.Commands.Count; }
public HostFactory( IVim vim, ITextBufferFactoryService bufferFactoryService, ITextEditorFactoryService editorFactoryService, IEditorOptionsFactoryService editorOptionsFactoryService, IKeyBindingService keyBindingService, SVsServiceProvider serviceProvider, IVsEditorAdaptersFactoryService adaptersFactory, IExternalEditorManager externalEditorManager, IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService, IFileSystem fileSystem, IVsAdapter adapter) { _vim = vim; _keyBindingService = keyBindingService; _bufferFactoryService = bufferFactoryService; _editorFactoryService = editorFactoryService; _editorOptionsFactoryService = editorOptionsFactoryService; _externalEditorManager = externalEditorManager; _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService; _adaptersFactory = adaptersFactory; _fileSystem = fileSystem; _adapter = adapter; }
protected virtual void Create(params EnvDTE.Command[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); _commandListSnapshot = new CommandListSnapshot(_dte.Object); _keyboardOptionsProvider = new Mock <IKeyboardOptionsProvider>(MockBehavior.Strict); _vimApplicationSettings = new Mock <IVimApplicationSettings>(MockBehavior.Strict); _vimApplicationSettings.SetupProperty(x => x.IgnoredConflictingKeyBinding, false); _vimApplicationSettings.SetupProperty(x => x.HaveUpdatedKeyBindings, false); _vimApplicationSettings.SetupProperty(x => x.KeyMappingIssueFixed, true); var list = new List <CommandKeyBinding>(); _vimApplicationSettings.SetupGet(x => x.RemovedBindings).Returns(list.AsReadOnly()); _serviceRaw = new KeyBindingService( _dte.Object, _keyboardOptionsProvider.Object, new Mock <IVimProtectedOperations>().Object, _vimApplicationSettings.Object, ScopeData.Default); _service = _serviceRaw; var result = _dte.Object.Commands.Count; }
internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings) { _keyBindingService = keyBindingService; _serviceProvider = serviceProvider; _vimApplicationSettings = vimApplicationSettings; }
private void Create(params string[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); _commandsSnapshot = new CommandsSnapshot(_dte.Object); var sp = MockObjectFactory.CreateVsServiceProvider( Tuple.Create(typeof(SDTE), (object)(_dte.Object)), Tuple.Create(typeof(SVsShell), (object)(new Mock<IVsShell>(MockBehavior.Strict)).Object)); _optionsDialogService = new Mock<IOptionsDialogService>(MockBehavior.Strict); _legacySettings = new Mock<ILegacySettings>(MockBehavior.Strict); _legacySettings.SetupGet(x => x.IgnoredConflictingKeyBinding).Returns(false); _legacySettings.SetupGet(x => x.HaveUpdatedKeyBindings).Returns(false); _serviceRaw = new KeyBindingService( sp.Object, _optionsDialogService.Object, new Mock<IProtectedOperations>().Object, _legacySettings.Object); _service = _serviceRaw; var result = _dte.Object.Commands.Count; }
internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, ILegacySettings legacySettings) { _keyBindingService = keyBindingService; _serviceProvider = serviceProvider; _legacySettings = legacySettings; }
private void Create(params string[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); var sp = MockObjectFactory.CreateVsServiceProvider(Tuple.Create(typeof(SDTE), (object)(_dte.Object))); _optionsDialogService = new Mock<IOptionsDialogService>(MockBehavior.Strict); _serviceRaw = new KeyBindingService(sp.Object, _optionsDialogService.Object); _service = _serviceRaw; }
internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider) { _keyBindingService = keyBindingService; _serviceProvider = serviceProvider; }
private void Create(params string[] args) { _dte = MockObjectFactory.CreateDteWithCommands(args); _commandsSnapshot = new CommandsSnapshot(_dte.Object); var sp = MockObjectFactory.CreateVsServiceProvider( Tuple.Create(typeof(SDTE), (object)(_dte.Object)), Tuple.Create(typeof(SVsShell), (object)(new Mock<IVsShell>(MockBehavior.Strict)).Object)); _optionsDialogService = new Mock<IOptionsDialogService>(MockBehavior.Strict); _serviceRaw = new KeyBindingService( sp.Object, _optionsDialogService.Object, new Mock<IProtectedOperations>().Object, new Mock<ILegacySettings>().Object); _service = _serviceRaw; }
internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService) { _vim = vim; _keyBindingService = keyBindingService; _formatMapService = formatMapService; }
internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, ILegacySettings legacySettings) { _keyBindingService = keyBindingService; _serviceProvider = provider; _legacySettings = legacySettings; }
internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider) { _keyBindingService = keyBindingService; _serviceProvider = provider; }