Beispiel #1
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,
            IExtensionAdapterBroker extensionAdapterBroker,
            SVsServiceProvider serviceProvider,
            ITelemetryProvider telemetryProvider)
            : 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>();
            _vimApplicationSettings  = vimApplicationSettings;
            _smartIndentationService = smartIndentationService;
            _extensionAdapterBroker  = extensionAdapterBroker;

            _vsMonitorSelection.AdviseSelectionEvents(this, out uint cookie);

            InitTelemetry(telemetryProvider.GetOrCreate(vimApplicationSettings, _dte), vimApplicationSettings);
        }
Beispiel #2
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,
            IExtensionAdapterBroker extensionAdapterBroker,
            SVsServiceProvider serviceProvider,
            ITelemetryProvider telemetryProvider)
            : 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>();
            _vimApplicationSettings = vimApplicationSettings;
            _smartIndentationService = smartIndentationService;
            _extensionAdapterBroker = extensionAdapterBroker;

            uint cookie;
            _vsMonitorSelection.AdviseSelectionEvents(this, out cookie);

            InitTelemetry(telemetryProvider.GetOrCreate(vimApplicationSettings, _dte), vimApplicationSettings);
        }
Beispiel #3
0
 public VimCocoaHost(
     ITextBufferFactoryService textBufferFactoryService,
     ICocoaTextEditorFactoryService textEditorFactoryService,
     ISmartIndentationService smartIndentationService,
     IExtensionAdapterBroker extensionAdapterBroker)
 {
     VimTrace.TraceSwitch.Level = System.Diagnostics.TraceLevel.Verbose;
     Console.WriteLine("Loaded");
     _textBufferFactoryService = textBufferFactoryService;
     _textEditorFactoryService = textEditorFactoryService;
     _smartIndentationService  = smartIndentationService;
     _extensionAdapterBroker   = extensionAdapterBroker;
 }
Beispiel #4
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,
            IExtensionAdapterBroker extensionAdapterBroker,
            IProtectedOperations protectedOperations,
            IMarkDisplayUtil markDisplayUtil,
            IControlCharUtil controlCharUtil,
            ICommandDispatcher commandDispatcher,
            SVsServiceProvider serviceProvider,
            IClipboardDevice clipboardDevice)
            : 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>();
            _vimApplicationSettings  = vimApplicationSettings;
            _smartIndentationService = smartIndentationService;
            _extensionAdapterBroker  = extensionAdapterBroker;
            _runningDocumentTable    = serviceProvider.GetService <SVsRunningDocumentTable, IVsRunningDocumentTable>();
            _vsShell                 = (IVsShell)serviceProvider.GetService(typeof(SVsShell));
            _protectedOperations     = protectedOperations;
            _commandDispatcher       = commandDispatcher;
            _clipboardDevice         = clipboardDevice;

            _vsMonitorSelection.AdviseSelectionEvents(this, out uint selectionCookie);
            _runningDocumentTable.AdviseRunningDocTableEvents(this, out uint runningDocumentTableCookie);

            InitOutputPane();

            _settingsSync = new SettingsSync(vimApplicationSettings, markDisplayUtil, controlCharUtil, _clipboardDevice);
            _settingsSync.SyncFromApplicationSettings();
        }
Beispiel #5
0
 internal VsAdapter(
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IIncrementalSearchFactoryService incrementalSearchFactoryService,
     IExtensionAdapterBroker extensionAdapterBroker,
     SVsServiceProvider vsServiceProvider)
 {
     _incrementalSearchFactoryService = incrementalSearchFactoryService;
     _editorAdaptersFactoryService    = editorAdaptersFactoryService;
     _editorOptionsFactoryService     = editorOptionsFactoryService;
     _serviceProvider        = vsServiceProvider;
     _textManager            = _serviceProvider.GetService <SVsTextManager, IVsTextManager>();
     _table                  = new RunningDocumentTable(_serviceProvider);
     _uiShell                = _serviceProvider.GetService <SVsUIShell, IVsUIShell>();
     _monitorSelection       = _serviceProvider.GetService <SVsShellMonitorSelection, IVsMonitorSelection>();
     _vsFindManager          = _serviceProvider.GetService <SVsFindManager, IVsFindManager>();
     _extensionAdapterBroker = extensionAdapterBroker;
     _visualStudioVersion    = vsServiceProvider.GetVisualStudioVersion();
 }
Beispiel #6
0
 internal VsAdapter(
     IVsEditorAdaptersFactoryService editorAdaptersFactoryService,
     IEditorOptionsFactoryService editorOptionsFactoryService,
     IIncrementalSearchFactoryService incrementalSearchFactoryService,
     IExtensionAdapterBroker extensionAdapterBroker,
     SVsServiceProvider vsServiceProvider)
 {
     _incrementalSearchFactoryService = incrementalSearchFactoryService;
     _editorAdaptersFactoryService = editorAdaptersFactoryService;
     _editorOptionsFactoryService = editorOptionsFactoryService;
     _serviceProvider = vsServiceProvider;
     _textManager = _serviceProvider.GetService<SVsTextManager, IVsTextManager>();
     _table = new RunningDocumentTable(_serviceProvider);
     _uiShell = _serviceProvider.GetService<SVsUIShell, IVsUIShell>();
     _monitorSelection = _serviceProvider.GetService<SVsShellMonitorSelection, IVsMonitorSelection>();
     _vsFindManager = _serviceProvider.GetService<SVsFindManager, IVsFindManager>();
     _extensionAdapterBroker = extensionAdapterBroker;
     _visualStudioVersion = vsServiceProvider.GetVisualStudioVersion();
 }