コード例 #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);
        }
コード例 #2
0
ファイル: VsVimHost.cs プロジェクト: jaredpar/VsVim
        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);
        }
コード例 #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;
 }
コード例 #4
0
ファイル: VsVimHost.cs プロジェクト: trigifu/VsVim
        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();
        }
コード例 #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();
 }
コード例 #6
0
ファイル: VsAdapter.cs プロジェクト: Yzzl/VsVim
 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();
 }