示例#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
 internal SettingsMigrator(SVsServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, ILegacySettings legacySettings, [EditorUtilsImport] IProtectedOperations protectedOperations)
 {
     _dte = serviceProvider.GetService<SDTE, _DTE>();
     _vimApplicationSettings = vimApplicationSettings;
     _legacySettings = legacySettings;
     _protectedOperations = protectedOperations;
 }
示例#4
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations)
 {
     _keyBindingService = keyBindingService;
     _serviceProvider = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations = protectedOperations;
 }
示例#5
0
        internal VsVimHost(
            IVsAdapter adapter,
            ITextBufferFactoryService textBufferFactoryService,
            ITextEditorFactoryService textEditorFactoryService,
            ITextDocumentFactoryService textDocumentFactoryService,
            ITextBufferUndoManagerProvider undoManagerProvider,
            IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
            IEditorOperationsFactoryService editorOperationsFactoryService,
            ISmartIndentationService smartIndentationService,
            ITextManager textManager,
            ISharedServiceFactory sharedServiceFactory,
            IVimApplicationSettings vimApplicationSettings,
            SVsServiceProvider serviceProvider)
            : base(textBufferFactoryService, textEditorFactoryService, textDocumentFactoryService, editorOperationsFactoryService)
        {
            _vsAdapter = adapter;
            _editorAdaptersFactoryService = editorAdaptersFactoryService;
            _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
            _vsExtensibility = (IVsExtensibility)serviceProvider.GetService(typeof(IVsExtensibility));
            _textManager = textManager;
            _sharedService = sharedServiceFactory.Create();
            _vsMonitorSelection = serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();
            _fontProperties = new TextEditorFontProperties(serviceProvider);
            _vimApplicationSettings = vimApplicationSettings;
            _smartIndentationService = smartIndentationService;

            uint cookie;
            _vsMonitorSelection.AdviseSelectionEvents(this, out cookie);
        }
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService, IVimApplicationSettings vimApplicationSettings)
 {
     _vim = vim;
     _keyBindingService = keyBindingService;
     _formatMapService = formatMapService;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#7
0
        public HostFactory(
            IVim vim,
            IVsEditorAdaptersFactoryService adaptersFactory,
            IDisplayWindowBrokerFactoryService displayWindowBrokerFactoryService,
            ITextManager textManager,
            IVsAdapter adapter,
            IVimProtectedOperations protectedOperations,
            IVimBufferCoordinatorFactory bufferCoordinatorFactory,
            IKeyUtil keyUtil,
            IEditorToSettingsSynchronizer editorToSettingSynchronizer,
            IVimApplicationSettings vimApplicationSettings,
            [ImportMany] IEnumerable<Lazy<ICommandTargetFactory, IOrderable>> commandTargetFactoryList)
        {
            _vim = vim;
            _displayWindowBrokerFactoryServcie = displayWindowBrokerFactoryService;
            _adaptersFactory = adaptersFactory;
            _textManager = textManager;
            _adapter = adapter;
            _protectedOperations = protectedOperations;
            _bufferCoordinatorFactory = bufferCoordinatorFactory;
            _keyUtil = keyUtil;
            _editorToSettingSynchronizer = editorToSettingSynchronizer;
            _vimApplicationSettings = vimApplicationSettings;
            _commandTargetFactoryList = Orderer.Order(commandTargetFactoryList).Select(x => x.Value).ToReadOnlyCollection();

            #if DEBUG
            VimTrace.TraceSwitch.Level = TraceLevel.Info;
            #endif
        }
 internal VimRcLoadNotificationMarginProvider(IVim vim, IVimApplicationSettings vimApplicationSettings, IToastNotificationServiceProvider toastNotificationServiceProvider, IVsAdapter vsAdapter)
 {
     _vim = vim;
     _vimApplicationSettings = vimApplicationSettings;
     _toastNotificationServiceProvider = toastNotificationServiceProvider;
     _vsAdapter = vsAdapter;
 }
示例#9
0
文件: VsVimHost.cs 项目: aesire/VsVim
 internal static void Initialize(IVimGlobalSettings globalSettings, IVimApplicationSettings vimApplicationSettings)
 {
     var settingsSource = new SettingsSource(vimApplicationSettings);
     globalSettings.AddCustomSetting(UseEditorIndentName, UseEditorIndentName, settingsSource);
     globalSettings.AddCustomSetting(UseEditorDefaultsName, UseEditorDefaultsName, settingsSource);
     globalSettings.AddCustomSetting(UseEditorTabAndBackspaceName, UseEditorTabAndBackspaceName, settingsSource);
 }
示例#10
0
 protected VimApplicationSettingsTest(VisualStudioVersion visualStudioVersion = VisualStudioVersion.Vs2010)
 {
     _factory = new MockRepository(MockBehavior.Strict);
     _protectedOperations = _factory.Create<IProtectedOperations>();
     _settingsStore = _factory.Create<WritableSettingsStore>();
     _vimApplicationSettingsRaw = new VimApplicationSettings(visualStudioVersion, _settingsStore.Object, _protectedOperations.Object);
     _vimApplicationSettings = _vimApplicationSettingsRaw;
 }
示例#11
0
 internal KeyBindingService(SVsServiceProvider serviceProvider, IOptionsDialogService service, [EditorUtilsImport] IProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings)
 {
     _dte = serviceProvider.GetService<SDTE, _DTE>();
     _vsShell = serviceProvider.GetService<SVsShell, IVsShell>();
     _optionsDialogService = service;
     _protectedOperations = protectedOperations;
     _vimApplicationSettings = vimApplicationSettings;
     _importantScopeSet = new Lazy<HashSet<string>>(CreateImportantScopeSet);
 }
示例#12
0
        internal KeyBindingService(_DTE dte, IKeyboardOptionsProvider keyboardOptionsProvider, IVimProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings, ScopeData scopeData)
        {
            _dte = dte;
            _keyboardOptionsProvider = keyboardOptionsProvider;
            _protectedOperations = protectedOperations;
            _vimApplicationSettings = vimApplicationSettings;
            _scopeData = scopeData;

            FixKeyMappingIssue();
        }
        internal FallbackKeyProcessorProvider(SVsServiceProvider serviceProvider, IKeyUtil keyUtil, IVimApplicationSettings vimApplicationSettings, IVim vim)
        {
            _dte = (_DTE)serviceProvider.GetService(typeof(_DTE));
            _keyUtil = keyUtil;
            _vimApplicationSettings = vimApplicationSettings;
            _vim = vim;

            var vsShell = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
            _scopeData = new ScopeData(vsShell);
        }
示例#14
0
        internal KeyBindingService(_DTE dte, IOptionsDialogService service, IVimProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings, ScopeData scopeData)
        {
            _dte = dte;
            _optionsDialogService = service;
            _protectedOperations = protectedOperations;
            _vimApplicationSettings = vimApplicationSettings;
            _scopeData = scopeData;

            FixKeyMappingIssue();
        }
        public ConflictingKeyBindingDialog(CommandKeyBindingSnapshot snapshot, IVimApplicationSettings vimApplicationSettings)
        {
            InitializeComponent();

            _snapshot = snapshot;
            _vimApplicationSettings = vimApplicationSettings;
            ComputeKeyBindings();

            BindingsListBox.ItemsSource = _keyBindingList;
            BindingsListBox.Items.SortDescriptions.Add(new SortDescription("KeyName", ListSortDirection.Ascending));
        }
示例#16
0
 internal ExternalEditorManager(
     IVimApplicationSettings vimApplicationSettings,
     IVsAdapter vsAdapter, 
     IVimProtectedOperations protectedOperations,
     [ImportMany] IEnumerable<IExternalEditAdapter> adapters)
 {
     _vimApplicationSettings = vimApplicationSettings;
     _vsAdapter = vsAdapter;
     _protectedOperations = protectedOperations;
     _adapterList = adapters.ToList();
 }
示例#17
0
        internal Telemetry(IVimApplicationSettings applicationSettings, _DTE dte)
        {
            _vimApplicationSettings = applicationSettings;

            var key = TryReadInstrumentationKey();
            if (key != null)
            {
                _client = CreateClient(dte, key);
                _dteEvents = dte.Events.DTEEvents;
                _dteEvents.OnBeginShutdown += OnBeginShutdown;
            }
        }
示例#18
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);
        }
        public KeyboardSettingsControl(CommandKeyBindingSnapshot snapshot, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations)
        {
            InitializeComponent();

            _snapshot = snapshot;
            _vimApplicationSettings = vimApplicationSettings;
            _protectedOperations = protectedOperations;
            ComputeKeyBindings();

            BindingsListBox.ItemsSource = _keyBindingList;
            BindingsListBox.Items.SortDescriptions.Add(new SortDescription("KeyName", ListSortDirection.Ascending));
        }
示例#20
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();
        }
        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);
        }
示例#22
0
 internal VsCommandTarget(
     IVimBufferCoordinator vimBufferCoordinator,
     ITextManager textManager,
     IVsAdapter vsAdapter,
     IDisplayWindowBroker broker,
     IKeyUtil keyUtil,
     IVimApplicationSettings vimApplicationSettings,
     IOleCommandTarget nextTarget,
     ReadOnlyCollection<ICommandTarget> commandTargets)
     : this(vimBufferCoordinator, textManager, vsAdapter, broker, keyUtil, vimApplicationSettings)
 {
     CompleteInit(nextTarget, commandTargets);
 }
示例#23
0
        /// <summary>
        /// In general a key processor applies to a specific IWpfTextView but
        /// by not making use of it, the fallback processor can be reused for
        /// multiple text views
        /// </summary>
        internal FallbackKeyProcessor(_DTE dte, IKeyUtil keyUtil, IVimApplicationSettings vimApplicationSettings, ITextView textView, IVimBuffer vimBuffer, ScopeData scopeData)
        {
            _dte = dte;
            _keyUtil = keyUtil;
            _vimApplicationSettings = vimApplicationSettings;
            _vimBuffer = vimBuffer;
            _scopeData = scopeData;
            _fallbackCommandList = new List<FallbackCommand>();

            // Register for key binding changes and get the current bindings
            _vimApplicationSettings.SettingsChanged += OnSettingsChanged;
            GetKeyBindings();

            textView.Closed += OnTextViewClosed;
        }
示例#24
0
        /// <summary>
        /// In general a key processor applies to a specific IWpfTextView but
        /// by not making use of it, the fallback processor can be reused for
        /// multiple text views
        /// </summary>
        internal FallbackKeyProcessor(IVsShell vsShell, _DTE dte, IKeyUtil keyUtil, IVimApplicationSettings vimApplicationSettings, ITextView textView, IVimBuffer vimBuffer, ScopeData scopeData)
        {
            _vsShell = vsShell;
            _dte = dte;
            _keyUtil = keyUtil;
            _vimApplicationSettings = vimApplicationSettings;
            _vimBuffer = vimBuffer;
            _scopeData = scopeData;
            _fallbackCommandList = Enumerable.Empty<FallbackCommand>().ToLookup(x => 'a');

            // Register for key binding changes and get the current bindings
            _vimApplicationSettings.SettingsChanged += OnSettingsChanged;
            GetKeyBindings();

            textView.Closed += OnTextViewClosed;
        }
示例#25
0
        internal StatusBarAdapter(IVim vim, IVimProtectedOperations vimProtectedOperations, ICommandMarginUtil commandMarginUtil, IVimApplicationSettings vimApplicationSettings, SVsServiceProvider vsServiceProvider)
        {
            _vim = vim;
            _vimProtectedOperations = vimProtectedOperations;
            _commandMarginUtil = commandMarginUtil;
            _vimApplicationSettings = vimApplicationSettings;
            _vsStatusbar = vsServiceProvider.GetService<SVsStatusbar, IVsStatusbar>();
            _timer = new DispatcherTimer(
                TimeSpan.FromSeconds(.1),
                DispatcherPriority.Normal,
                OnTimer,
                Dispatcher.CurrentDispatcher);

            _timer.IsEnabled = !_vimApplicationSettings.UseEditorCommandMargin;
            _vimApplicationSettings.SettingsChanged += OnSettingsChanged;
        }
示例#26
0
 private VsCommandTarget(
     IVimBufferCoordinator vimBufferCoordinator,
     ITextManager textManager,
     IVsAdapter vsAdapter,
     IDisplayWindowBroker broker,
     IKeyUtil keyUtil,
     IVimApplicationSettings vimApplicationSettings)
 {
     _vimBuffer = vimBufferCoordinator.VimBuffer;
     _vim = _vimBuffer.Vim;
     _vimBufferCoordinator = vimBufferCoordinator;
     _textBuffer = _vimBuffer.TextBuffer;
     _vsAdapter = vsAdapter;
     _broker = broker;
     _keyUtil = keyUtil;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#27
0
        internal ExternalEditMonitor(
            IVimApplicationSettings vimApplicationSettings,
            IVimBuffer buffer,
            IProtectedOperations protectedOperations,
            Result<IVsTextLines> vsTextLines,
            ReadOnlyCollection<ITagger<ITag>> taggerCollection,
            ReadOnlyCollection<IExternalEditAdapter> externalEditorAdapters)
        {
            _vimApplicationSettings = vimApplicationSettings;
            _vsTextLines = vsTextLines;
            _protectedOperations = protectedOperations;
            _externalEditorAdapters = externalEditorAdapters;
            _taggerCollection = taggerCollection;
            _buffer = buffer;
            _buffer.TextView.LayoutChanged += OnLayoutChanged;
            _buffer.SwitchedMode += OnSwitchedMode;
            _textView = _buffer.TextView;

            foreach (var tagger in _taggerCollection)
            {
                tagger.TagsChanged += OnTagsChanged;
            }
        }
示例#28
0
 private SettingsSource(IVimApplicationSettings vimApplicationSettings)
 {
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#29
0
        internal KeyBindingService(_DTE dte, IOptionsDialogService service, IVimProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings, ScopeData scopeData)
        {
            _dte = dte;
            _optionsDialogService   = service;
            _protectedOperations    = protectedOperations;
            _vimApplicationSettings = vimApplicationSettings;
            _scopeData = scopeData;

            FixKeyMappingIssue();
        }
示例#30
0
 internal KeyBindingService(SVsServiceProvider serviceProvider, IOptionsDialogService service, IVimProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings)
     : this(serviceProvider.GetService <SDTE, _DTE>(), service, protectedOperations, vimApplicationSettings, new ScopeData(serviceProvider.GetService <SVsShell, IVsShell>()))
 {
 }
        internal StatusBarAdapter(IVim vim, IVimProtectedOperations vimProtectedOperations, ICommandMarginUtil commandMarginUtil, IVimApplicationSettings vimApplicationSettings, SVsServiceProvider vsServiceProvider)
        {
            _vim = vim;
            _vimProtectedOperations = vimProtectedOperations;
            _commandMarginUtil      = commandMarginUtil;
            _vimApplicationSettings = vimApplicationSettings;
            _vsStatusbar            = vsServiceProvider.GetService <SVsStatusbar, IVsStatusbar>();
            _timer = new DispatcherTimer(
                TimeSpan.FromSeconds(.1),
                DispatcherPriority.Normal,
                OnTimer,
                Dispatcher.CurrentDispatcher);

            _timer.IsEnabled = !_vimApplicationSettings.UseEditorCommandMargin;
            _vimApplicationSettings.SettingsChanged += OnSettingsChanged;
        }
示例#32
0
 private SettingsSource(IVimApplicationSettings vimApplicationSettings)
 {
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#33
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, [EditorUtilsImport] IProtectedOperations protectedOperations)
 {
     _keyBindingService      = keyBindingService;
     _serviceProvider        = provider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations    = protectedOperations;
 }
        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);
        }
示例#35
0
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IVimApplicationSettings vimApplicationSettings, IToastNotificationServiceProvider toastNotificationServiceProvider)
 {
     _vim = vim;
     _keyBindingService                = keyBindingService;
     _vimApplicationSettings           = vimApplicationSettings;
     _toastNotificationServiceProvider = toastNotificationServiceProvider;
 }
示例#36
0
 internal ConflictingKeyBindingMarginProvider(IVim vim, IKeyBindingService keyBindingService, IEditorFormatMapService formatMapService, IVimApplicationSettings vimApplicationSettings)
 {
     _vim = vim;
     _keyBindingService      = keyBindingService;
     _formatMapService       = formatMapService;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#37
0
 internal OptionsDialogService(IVimApplicationSettings vimApplicationSettings, [EditorUtilsImport] IProtectedOperations protectedOperations)
 {
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations    = protectedOperations;
 }
示例#38
0
 internal OptionsDialogService(IVimApplicationSettings vimApplicationSettings, IVimProtectedOperations protectedOperations)
 {
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations    = protectedOperations;
 }
        internal FallbackKeyProcessorProvider(SVsServiceProvider serviceProvider, IKeyUtil keyUtil, IVimApplicationSettings vimApplicationSettings, IVim vim, IVsAdapter vsAdapter)
        {
            _dte     = (_DTE)serviceProvider.GetService(typeof(_DTE));
            _keyUtil = keyUtil;
            _vimApplicationSettings = vimApplicationSettings;
            _vim       = vim;
            _vsAdapter = vsAdapter;

            _vsShell   = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
            _scopeData = new ScopeData(_vsShell);
        }
示例#40
0
 internal BackspaceNotificationMarginProvider(IVim vim, IVimApplicationSettings vimApplicationSettings, IEditorFormatMapService editorFormatMapService)
 {
     _vim = vim;
     _vimApplicationSettings = vimApplicationSettings;
     _editorFormatMapService = editorFormatMapService;
 }
 internal VimRcLoadNotificationMarginProvider(IVim vim, IVimApplicationSettings vimApplicationSettings, IToastNotificationServiceProvider toastNotificationServiceProvider)
 {
     _vim = vim;
     _vimApplicationSettings           = vimApplicationSettings;
     _toastNotificationServiceProvider = toastNotificationServiceProvider;
 }
示例#42
0
 internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings)
 {
     _keyBindingService      = keyBindingService;
     _serviceProvider        = provider;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#43
0
 internal KeyBindingService(SVsServiceProvider serviceProvider, IOptionsDialogService service, IVimProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings)
     : this(serviceProvider.GetService<SDTE, _DTE>(), service, protectedOperations, vimApplicationSettings, new ScopeData(serviceProvider.GetService<SVsShell, IVsShell>()))
 {
 }
示例#44
0
        internal KeyBindingService(_DTE dte, IKeyboardOptionsProvider keyboardOptionsProvider, IProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings, ScopeData scopeData)
        {
            _dte = dte;
            _keyboardOptionsProvider = keyboardOptionsProvider;
            _protectedOperations     = protectedOperations;
            _vimApplicationSettings  = vimApplicationSettings;
            _scopeData = scopeData;

            FixKeyMappingIssue();
        }
示例#45
0
        internal static Result<VsCommandTarget> Create(
            IVimBufferCoordinator vimBufferCoordinator,
            IVsTextView vsTextView,
            ITextManager textManager,
            IVsAdapter adapter,
            IDisplayWindowBroker broker,
            IKeyUtil keyUtil,
            IVimApplicationSettings vimApplicationSettings,
            ReadOnlyCollection<ICommandTargetFactory> commandTargetFactoryList)
        {
            var vsCommandTarget = new VsCommandTarget(vimBufferCoordinator, textManager, adapter, broker, keyUtil, vimApplicationSettings);

            IOleCommandTarget nextCommandTarget;
            var hresult = vsTextView.AddCommandFilter(vsCommandTarget, out nextCommandTarget);
            if (ErrorHandler.Failed(hresult))
            {
                return Result.CreateError(hresult);
            }

            var commandTargets = commandTargetFactoryList
                .Select(x => x.CreateCommandTarget(nextCommandTarget, vimBufferCoordinator))
                .Where(x => x != null)
                .ToReadOnlyCollection();
            vsCommandTarget.CompleteInit(nextCommandTarget, commandTargets);
            return Result.CreateSuccess(vsCommandTarget);
        }
示例#46
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations)
 {
     _keyBindingService      = keyBindingService;
     _serviceProvider        = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
     _protectedOperations    = protectedOperations;
 }
示例#47
0
 internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings)
 {
     _keyBindingService      = keyBindingService;
     _serviceProvider        = serviceProvider;
     _vimApplicationSettings = vimApplicationSettings;
 }
示例#48
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();
        }
示例#49
0
 internal KeyBindingService(SVsServiceProvider serviceProvider, IOptionsDialogService service, [EditorUtilsImport] IProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings)
 {
     _dte     = serviceProvider.GetService <SDTE, _DTE>();
     _vsShell = serviceProvider.GetService <SVsShell, IVsShell>();
     _optionsDialogService   = service;
     _protectedOperations    = protectedOperations;
     _vimApplicationSettings = vimApplicationSettings;
     _importantScopeSet      = new Lazy <HashSet <string> >(CreateImportantScopeSet);
 }
示例#50
0
 internal SettingsMigrator(_DTE dte, IVimApplicationSettings vimApplicationSettings, ILegacySettings legacySettings)
 {
     _dte = dte;
     _vimApplicationSettings = vimApplicationSettings;
     _legacySettings         = legacySettings;
 }