示例#1
0
 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;
 }
示例#3
0
        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;
 }
示例#5
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations = protectedOperations;
 }
示例#6
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, IVimProtectedOperations protectedOperations)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = provider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations = protectedOperations;
 }
示例#7
0
文件: HostFactory.cs 项目: sh54/VsVim
 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;
 }
示例#8
0
        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
        }
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService, ILegacySettings legacySettings)
 {
     _vim = vim;
     _keyBindingService = keyBindingService;
     _formatMapService = formatMapService;
     _legacySettings = legacySettings;
 }
示例#10
0
        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;
        }
示例#11
0
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService, IVimApplicationSettings vimApplicationSettings)
 {
     _vim = vim;
     _keyBindingService      = keyBindingService;
     _formatMapService       = formatMapService;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#12
0
        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, IVimApplicationSettings vimApplicationSettings)
 {
     _vim = vim;
     _keyBindingService = keyBindingService;
     _formatMapService = formatMapService;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#14
0
 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;
 }
示例#15
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations)
 {
     _keyBindingService      = keyBindingService;
     _serviceProvider        = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations    = protectedOperations;
 }
示例#16
0
        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
        }
示例#17
0
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IVimApplicationSettings vimApplicationSettings, IToastNotificationServiceProvider toastNotificationServiceProvider)
 {
     _vim = vim;
     _keyBindingService                = keyBindingService;
     _vimApplicationSettings           = vimApplicationSettings;
     _toastNotificationServiceProvider = toastNotificationServiceProvider;
 }
示例#18
0
        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;
        }
示例#19
0
        /// <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);
            }
        }
示例#20
0
        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);
        }
示例#21
0
        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);
        }
示例#22
0
        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();
        }
示例#23
0
        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);
        }
示例#24
0
        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();
        }
示例#25
0
        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, 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);
        }
示例#27
0
 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();
     }
 }
示例#28
0
 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);
        }
示例#30
0
        /// <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);
            }
        }
示例#31
0
        /// <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);
            }
        }
示例#32
0
        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;
        }
示例#33
0
        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>();
        }
示例#34
0
 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;
 }
示例#35
0
        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;
        }
示例#36
0
        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;
        }
示例#37
0
 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;
 }
示例#38
0
        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;
        }
示例#39
0
 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;
 }
示例#40
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#41
0
        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;
        }
示例#42
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
     _legacySettings = legacySettings;
 }
示例#43
0
 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;
 }
示例#44
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
 }
示例#45
0
 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;
 }
示例#47
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider   = serviceProvider;
     _legacySettings    = legacySettings;
 }
示例#48
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider   = provider;
     _legacySettings    = legacySettings;
 }
示例#49
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = provider;
 }
示例#50
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = provider;
     _legacySettings = legacySettings;
 }
示例#51
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings)
 {
     _keyBindingService      = keyBindingService;
     _serviceProvider        = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
 }
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService)
 {
     _vim = vim;
     _keyBindingService = keyBindingService;
     _formatMapService  = formatMapService;
 }