Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 5
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations = protectedOperations;
 }
Esempio n. 6
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, IVimProtectedOperations protectedOperations)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = provider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations = protectedOperations;
 }
Esempio n. 7
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;
 }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 11
0
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService, IVimApplicationSettings vimApplicationSettings)
 {
     _vim = vim;
     _keyBindingService      = keyBindingService;
     _formatMapService       = formatMapService;
     _vimApplicationSettings = vimApplicationSettings;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 15
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations)
 {
     _keyBindingService      = keyBindingService;
     _serviceProvider        = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations    = protectedOperations;
 }
Esempio n. 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
        }
Esempio n. 17
0
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IVimApplicationSettings vimApplicationSettings, IToastNotificationServiceProvider toastNotificationServiceProvider)
 {
     _vim = vim;
     _keyBindingService                = keyBindingService;
     _vimApplicationSettings           = vimApplicationSettings;
     _toastNotificationServiceProvider = toastNotificationServiceProvider;
 }
Esempio n. 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;
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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();
        }
Esempio n. 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);
        }
Esempio n. 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();
     }
 }
Esempio n. 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);
        }
Esempio n. 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);
            }
        }
Esempio n. 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);
            }
        }
Esempio n. 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;
        }
Esempio n. 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>();
        }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 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;
 }
Esempio n. 40
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
 }
Esempio n. 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;
        }
Esempio n. 42
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
     _legacySettings = legacySettings;
 }
Esempio n. 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;
 }
Esempio n. 44
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
 }
Esempio n. 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;
 }
Esempio n. 47
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider   = serviceProvider;
     _legacySettings    = legacySettings;
 }
Esempio n. 48
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider   = provider;
     _legacySettings    = legacySettings;
 }
Esempio n. 49
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = provider;
 }
Esempio n. 50
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, ILegacySettings legacySettings)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = provider;
     _legacySettings = legacySettings;
 }
Esempio n. 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;
 }