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; }
internal SettingsMigrator(SVsServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, ILegacySettings legacySettings, [EditorUtilsImport] IProtectedOperations protectedOperations) { _dte = serviceProvider.GetService<SDTE, _DTE>(); _vimApplicationSettings = vimApplicationSettings; _legacySettings = legacySettings; _protectedOperations = protectedOperations; }
internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings, IProtectedOperations protectedOperations) { _keyBindingService = keyBindingService; _serviceProvider = serviceProvider; _vimApplicationSettings = vimApplicationSettings; _protectedOperations = protectedOperations; }
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; }
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; }
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); }
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; }
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); }
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); }
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)); }
internal ExternalEditorManager( IVimApplicationSettings vimApplicationSettings, IVsAdapter vsAdapter, IVimProtectedOperations protectedOperations, [ImportMany] IEnumerable<IExternalEditAdapter> adapters) { _vimApplicationSettings = vimApplicationSettings; _vsAdapter = vsAdapter; _protectedOperations = protectedOperations; _adapterList = adapters.ToList(); }
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; } }
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)); }
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); }
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); }
/// <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; }
/// <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; }
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; }
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; }
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; } }
private SettingsSource(IVimApplicationSettings vimApplicationSettings) { _vimApplicationSettings = vimApplicationSettings; }
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; }
internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings, [EditorUtilsImport] IProtectedOperations protectedOperations) { _keyBindingService = keyBindingService; _serviceProvider = provider; _vimApplicationSettings = vimApplicationSettings; _protectedOperations = protectedOperations; }
internal OptionsDialogService(IVimApplicationSettings vimApplicationSettings, [EditorUtilsImport] IProtectedOperations protectedOperations) { _vimApplicationSettings = vimApplicationSettings; _protectedOperations = protectedOperations; }
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); }
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; }
internal OptionsProviderFatory(IKeyBindingService keyBindingService, SVsServiceProvider provider, IVimApplicationSettings vimApplicationSettings) { _keyBindingService = keyBindingService; _serviceProvider = provider; _vimApplicationSettings = vimApplicationSettings; }
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 KeyBindingService(_DTE dte, IKeyboardOptionsProvider keyboardOptionsProvider, IProtectedOperations protectedOperations, IVimApplicationSettings vimApplicationSettings, ScopeData scopeData) { _dte = dte; _keyboardOptionsProvider = keyboardOptionsProvider; _protectedOperations = protectedOperations; _vimApplicationSettings = vimApplicationSettings; _scopeData = scopeData; FixKeyMappingIssue(); }
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); }
internal Provider(IKeyBindingService keyBindingService, IServiceProvider serviceProvider, IVimApplicationSettings vimApplicationSettings) { _keyBindingService = keyBindingService; _serviceProvider = serviceProvider; _vimApplicationSettings = vimApplicationSettings; }
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); }
internal SettingsMigrator(_DTE dte, IVimApplicationSettings vimApplicationSettings, ILegacySettings legacySettings) { _dte = dte; _vimApplicationSettings = vimApplicationSettings; _legacySettings = legacySettings; }