forked from microsoft/vscode-python
/
serviceRegistry.ts
328 lines (322 loc) · 24.7 KB
/
serviceRegistry.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { IExtensionSingleActivationService } from '../activation/types';
import { UseCustomEditorApi, UseVSCodeNotebookEditorApi } from '../common/constants';
import { NotebookEditorSupport } from '../common/experiments/groups';
import { FileSystemPathUtils } from '../common/platform/fs-paths';
import { IFileSystemPathUtils } from '../common/platform/types';
import { StartPage } from '../common/startPage/startPage';
import { IStartPage } from '../common/startPage/types';
import { IExperimentsManager } from '../common/types';
import { ProtocolParser } from '../debugger/extension/helpers/protocolParser';
import { IProtocolParser } from '../debugger/extension/types';
import { IServiceManager } from '../ioc/types';
import { Activation } from './activation';
import { CodeCssGenerator } from './codeCssGenerator';
import { JupyterCommandLineSelectorCommand } from './commands/commandLineSelector';
import { CommandRegistry } from './commands/commandRegistry';
import { ExportCommands } from './commands/exportCommands';
import { NotebookCommands } from './commands/notebookCommands';
import { JupyterServerSelectorCommand } from './commands/serverSelector';
import { DataScienceStartupTime, Identifiers, OurNotebookProvider, VSCodeNotebookProvider } from './constants';
import { ActiveEditorContextService } from './context/activeEditorContext';
import { DataViewer } from './data-viewing/dataViewer';
import { DataViewerDependencyService } from './data-viewing/dataViewerDependencyService';
import { DataViewerFactory } from './data-viewing/dataViewerFactory';
import { JupyterVariableDataProvider } from './data-viewing/jupyterVariableDataProvider';
import { JupyterVariableDataProviderFactory } from './data-viewing/jupyterVariableDataProviderFactory';
import { IDataViewer, IDataViewerFactory } from './data-viewing/types';
import { DataScience } from './datascience';
import { DataScienceFileSystem } from './dataScienceFileSystem';
import { DataScienceSurveyBannerLogger } from './dataScienceSurveyBanner';
import { DebugLocationTrackerFactory } from './debugLocationTrackerFactory';
import { CellHashProvider } from './editor-integration/cellhashprovider';
import { CodeLensFactory } from './editor-integration/codeLensFactory';
import { DataScienceCodeLensProvider } from './editor-integration/codelensprovider';
import { CodeWatcher } from './editor-integration/codewatcher';
import { Decorator } from './editor-integration/decorator';
import { HoverProvider } from './editor-integration/hoverProvider';
import { DataScienceErrorHandler } from './errorHandler/errorHandler';
import { ExportBase } from './export/exportBase';
import { ExportDependencyChecker } from './export/exportDependencyChecker';
import { ExportFileOpener } from './export/exportFileOpener';
import { ExportManager } from './export/exportManager';
import { ExportManagerFilePicker } from './export/exportManagerFilePicker';
import { ExportToHTML } from './export/exportToHTML';
import { ExportToPDF } from './export/exportToPDF';
import { ExportToPython } from './export/exportToPython';
import { ExportUtil } from './export/exportUtil';
import { ExportFormat, IExport, IExportManager, IExportManagerFilePicker } from './export/types';
import { GatherListener } from './gather/gatherListener';
import { GatherLogger } from './gather/gatherLogger';
import { DebugListener } from './interactive-common/debugListener';
import { IntellisenseProvider } from './interactive-common/intellisense/intellisenseProvider';
import { LinkProvider } from './interactive-common/linkProvider';
import { NotebookProvider } from './interactive-common/notebookProvider';
import { NotebookServerProvider } from './interactive-common/notebookServerProvider';
import { NotebookUsageTracker } from './interactive-common/notebookUsageTracker';
import { ShowPlotListener } from './interactive-common/showPlotListener';
import { AutoSaveService } from './interactive-ipynb/autoSaveService';
import { DigestStorage } from './interactive-ipynb/digestStorage';
import { NativeEditor } from './interactive-ipynb/nativeEditor';
import { NativeEditorCommandListener } from './interactive-ipynb/nativeEditorCommandListener';
import { NativeEditorOldWebView } from './interactive-ipynb/nativeEditorOldWebView';
import { NativeEditorProviderOld } from './interactive-ipynb/nativeEditorProviderOld';
import { NativeEditorRunByLineListener } from './interactive-ipynb/nativeEditorRunByLineListener';
import { NativeEditorSynchronizer } from './interactive-ipynb/nativeEditorSynchronizer';
import { NativeEditorViewTracker } from './interactive-ipynb/nativeEditorViewTracker';
import { TrustCommandHandler } from './interactive-ipynb/trustCommandHandler';
import { TrustService } from './interactive-ipynb/trustService';
import { InteractiveWindow } from './interactive-window/interactiveWindow';
import { InteractiveWindowCommandListener } from './interactive-window/interactiveWindowCommandListener';
import { InteractiveWindowProvider } from './interactive-window/interactiveWindowProvider';
import { IPyWidgetHandler } from './ipywidgets/ipywidgetHandler';
import { IPyWidgetMessageDispatcherFactory } from './ipywidgets/ipyWidgetMessageDispatcherFactory';
import { IPyWidgetScriptSource } from './ipywidgets/ipyWidgetScriptSource';
import { JupyterCommandLineSelector } from './jupyter/commandLineSelector';
import { DebuggerVariableRegistration } from './jupyter/debuggerVariableRegistration';
import { DebuggerVariables } from './jupyter/debuggerVariables';
import { JupyterCommandFactory } from './jupyter/interpreter/jupyterCommand';
import { JupyterInterpreterDependencyService } from './jupyter/interpreter/jupyterInterpreterDependencyService';
import { JupyterInterpreterOldCacheStateStore } from './jupyter/interpreter/jupyterInterpreterOldCacheStateStore';
import { JupyterInterpreterSelectionCommand } from './jupyter/interpreter/jupyterInterpreterSelectionCommand';
import { JupyterInterpreterSelector } from './jupyter/interpreter/jupyterInterpreterSelector';
import { JupyterInterpreterService } from './jupyter/interpreter/jupyterInterpreterService';
import { JupyterInterpreterStateStore } from './jupyter/interpreter/jupyterInterpreterStateStore';
import { JupyterInterpreterSubCommandExecutionService } from './jupyter/interpreter/jupyterInterpreterSubCommandExecutionService';
import { CellOutputMimeTypeTracker } from './jupyter/jupyterCellOutputMimeTypeTracker';
import { JupyterDebugger } from './jupyter/jupyterDebugger';
import { JupyterExecutionFactory } from './jupyter/jupyterExecutionFactory';
import { JupyterExporter } from './jupyter/jupyterExporter';
import { JupyterImporter } from './jupyter/jupyterImporter';
import { JupyterNotebookProvider } from './jupyter/jupyterNotebookProvider';
import { JupyterPasswordConnect } from './jupyter/jupyterPasswordConnect';
import { JupyterServerWrapper } from './jupyter/jupyterServerWrapper';
import { JupyterSessionManagerFactory } from './jupyter/jupyterSessionManagerFactory';
import { JupyterVariables } from './jupyter/jupyterVariables';
import { KernelDependencyService } from './jupyter/kernels/kernelDependencyService';
import { KernelSelectionProvider } from './jupyter/kernels/kernelSelections';
import { KernelSelector } from './jupyter/kernels/kernelSelector';
import { KernelService } from './jupyter/kernels/kernelService';
import { KernelSwitcher } from './jupyter/kernels/kernelSwitcher';
import { KernelVariables } from './jupyter/kernelVariables';
import { NotebookStarter } from './jupyter/notebookStarter';
import { OldJupyterVariables } from './jupyter/oldJupyterVariables';
import { ServerPreload } from './jupyter/serverPreload';
import { JupyterServerSelector } from './jupyter/serverSelector';
import { JupyterDebugService } from './jupyterDebugService';
import { JupyterUriProviderRegistration } from './jupyterUriProviderRegistration';
import { KernelDaemonPool } from './kernel-launcher/kernelDaemonPool';
import { KernelDaemonPreWarmer } from './kernel-launcher/kernelDaemonPreWarmer';
import { KernelFinder } from './kernel-launcher/kernelFinder';
import { KernelLauncher } from './kernel-launcher/kernelLauncher';
import { IKernelFinder, IKernelLauncher } from './kernel-launcher/types';
import { MultiplexingDebugService } from './multiplexingDebugService';
import { NotebookEditorCompatibilitySupport } from './notebook/notebookEditorCompatibilitySupport';
import { NotebookEditorProvider } from './notebook/notebookEditorProvider';
import { NotebookEditorProviderWrapper } from './notebook/notebookEditorProviderWrapper';
import { registerTypes as registerNotebookTypes } from './notebook/serviceRegistry';
import { NotebookAndInteractiveWindowUsageTracker } from './notebookAndInteractiveTracker';
import { NotebookExtensibility } from './notebookExtensibility';
import { NotebookModelFactory } from './notebookStorage/factory';
import { NativeEditorProvider } from './notebookStorage/nativeEditorProvider';
import { NativeEditorStorage } from './notebookStorage/nativeEditorStorage';
import { INotebookStorageProvider, NotebookStorageProvider } from './notebookStorage/notebookStorageProvider';
import { INotebookModelFactory } from './notebookStorage/types';
import { PlotViewer } from './plotting/plotViewer';
import { PlotViewerProvider } from './plotting/plotViewerProvider';
import { PreWarmActivatedJupyterEnvironmentVariables } from './preWarmVariables';
import { ProgressReporter } from './progress/progressReporter';
import { RawNotebookProviderWrapper } from './raw-kernel/rawNotebookProviderWrapper';
import { RawNotebookSupportedService } from './raw-kernel/rawNotebookSupportedService';
import { StatusProvider } from './statusProvider';
import { ThemeFinder } from './themeFinder';
import {
ICellHashListener,
ICellHashProvider,
ICodeCssGenerator,
ICodeLensFactory,
ICodeWatcher,
IDataScience,
IDataScienceCodeLensProvider,
IDataScienceCommandListener,
IDataScienceErrorHandler,
IDataScienceFileSystem,
IDebugLocationTracker,
IDigestStorage,
IGatherLogger,
IInteractiveWindow,
IInteractiveWindowListener,
IInteractiveWindowProvider,
IJupyterCommandFactory,
IJupyterDebugger,
IJupyterDebugService,
IJupyterExecution,
IJupyterInterpreterDependencyManager,
IJupyterNotebookProvider,
IJupyterPasswordConnect,
IJupyterServerProvider,
IJupyterSessionManagerFactory,
IJupyterSubCommandExecutionService,
IJupyterUriProviderRegistration,
IJupyterVariableDataProvider,
IJupyterVariableDataProviderFactory,
IJupyterVariables,
IKernelDependencyService,
INotebookAndInteractiveWindowUsageTracker,
INotebookEditor,
INotebookEditorProvider,
INotebookExecutionLogger,
INotebookExporter,
INotebookExtensibility,
INotebookImporter,
INotebookProvider,
INotebookServer,
INotebookStorage,
IPlotViewer,
IPlotViewerProvider,
IRawNotebookProvider,
IRawNotebookSupportedService,
IStatusProvider,
IThemeFinder,
ITrustService
} from './types';
// README: Did you make sure "dataScienceIocContainer.ts" has also been updated appropriately?
// tslint:disable-next-line: max-func-body-length
export function registerTypes(serviceManager: IServiceManager) {
const experiments = serviceManager.get<IExperimentsManager>(IExperimentsManager);
const useVSCodeNotebookAPI = experiments.inExperiment(NotebookEditorSupport.nativeNotebookExperiment);
const inCustomEditorApiExperiment = experiments.inExperiment(NotebookEditorSupport.customEditorExperiment);
const usingCustomEditor = inCustomEditorApiExperiment;
serviceManager.addSingletonInstance<boolean>(UseCustomEditorApi, usingCustomEditor);
serviceManager.addSingletonInstance<boolean>(UseVSCodeNotebookEditorApi, useVSCodeNotebookAPI);
serviceManager.addSingletonInstance<number>(DataScienceStartupTime, Date.now());
// This condition is temporary.
serviceManager.addSingleton<INotebookEditorProvider>(VSCodeNotebookProvider, NotebookEditorProvider);
serviceManager.addSingleton<INotebookEditorProvider>(OurNotebookProvider, usingCustomEditor ? NativeEditorProvider : NativeEditorProviderOld);
serviceManager.addSingleton<INotebookEditorProvider>(INotebookEditorProvider, NotebookEditorProviderWrapper);
serviceManager.add<IExtensionSingleActivationService>(IExtensionSingleActivationService, NotebookEditorCompatibilitySupport);
serviceManager.add<NotebookEditorCompatibilitySupport>(NotebookEditorCompatibilitySupport, NotebookEditorCompatibilitySupport);
if (!useVSCodeNotebookAPI) {
serviceManager.add<INotebookEditor>(INotebookEditor, usingCustomEditor ? NativeEditor : NativeEditorOldWebView);
// These are never going to be required for new VSC NB.
if (!usingCustomEditor) {
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, AutoSaveService);
}
serviceManager.addSingleton<NativeEditorSynchronizer>(NativeEditorSynchronizer, NativeEditorSynchronizer);
}
serviceManager.add<ICellHashProvider>(ICellHashProvider, CellHashProvider, undefined, [INotebookExecutionLogger]);
serviceManager.addSingleton<INotebookModelFactory>(INotebookModelFactory, NotebookModelFactory);
serviceManager.addSingleton<INotebookExecutionLogger>(INotebookExecutionLogger, HoverProvider);
serviceManager.add<ICodeWatcher>(ICodeWatcher, CodeWatcher);
serviceManager.addSingleton<IDataScienceErrorHandler>(IDataScienceErrorHandler, DataScienceErrorHandler);
serviceManager.add<IDataViewer>(IDataViewer, DataViewer);
serviceManager.add<IInteractiveWindow>(IInteractiveWindow, InteractiveWindow);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, DebugListener);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, GatherListener);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, IntellisenseProvider);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, LinkProvider);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, ShowPlotListener);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, IPyWidgetHandler);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, IPyWidgetScriptSource);
serviceManager.add<IInteractiveWindowListener>(IInteractiveWindowListener, NativeEditorRunByLineListener);
serviceManager.add<IJupyterCommandFactory>(IJupyterCommandFactory, JupyterCommandFactory);
serviceManager.add<INotebookExporter>(INotebookExporter, JupyterExporter);
serviceManager.add<INotebookImporter>(INotebookImporter, JupyterImporter);
serviceManager.add<INotebookServer>(INotebookServer, JupyterServerWrapper);
serviceManager.addSingleton<INotebookStorage>(INotebookStorage, NativeEditorStorage);
serviceManager.addSingleton<INotebookStorageProvider>(INotebookStorageProvider, NotebookStorageProvider);
serviceManager.addSingleton<IRawNotebookProvider>(IRawNotebookProvider, RawNotebookProviderWrapper);
serviceManager.addSingleton<IRawNotebookSupportedService>(IRawNotebookSupportedService, RawNotebookSupportedService);
serviceManager.addSingleton<IJupyterNotebookProvider>(IJupyterNotebookProvider, JupyterNotebookProvider);
serviceManager.add<IPlotViewer>(IPlotViewer, PlotViewer);
serviceManager.addSingleton<IKernelLauncher>(IKernelLauncher, KernelLauncher);
serviceManager.addSingleton<IKernelFinder>(IKernelFinder, KernelFinder);
serviceManager.addSingleton<ActiveEditorContextService>(ActiveEditorContextService, ActiveEditorContextService);
serviceManager.addSingleton<CellOutputMimeTypeTracker>(CellOutputMimeTypeTracker, CellOutputMimeTypeTracker, undefined, [IExtensionSingleActivationService, INotebookExecutionLogger]);
serviceManager.addSingleton<CommandRegistry>(CommandRegistry, CommandRegistry);
serviceManager.addSingleton<DataViewerDependencyService>(DataViewerDependencyService, DataViewerDependencyService);
serviceManager.addSingleton<ICodeCssGenerator>(ICodeCssGenerator, CodeCssGenerator);
serviceManager.addSingleton<ICodeLensFactory>(ICodeLensFactory, CodeLensFactory, undefined, [IInteractiveWindowListener]);
serviceManager.addSingleton<IDataScience>(IDataScience, DataScience);
serviceManager.addSingleton<IDataScienceCodeLensProvider>(IDataScienceCodeLensProvider, DataScienceCodeLensProvider);
serviceManager.addSingleton<IDataScienceCommandListener>(IDataScienceCommandListener, InteractiveWindowCommandListener);
serviceManager.addSingleton<IDataScienceCommandListener>(IDataScienceCommandListener, NativeEditorCommandListener);
serviceManager.addSingleton<IDataViewerFactory>(IDataViewerFactory, DataViewerFactory);
serviceManager.addSingleton<IDebugLocationTracker>(IDebugLocationTracker, DebugLocationTrackerFactory);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, Activation);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, Decorator);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, JupyterInterpreterSelectionCommand);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, PreWarmActivatedJupyterEnvironmentVariables);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, ServerPreload);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, NativeEditorViewTracker);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, NotebookUsageTracker);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, TrustCommandHandler);
serviceManager.addSingleton<IInteractiveWindowListener>(IInteractiveWindowListener, DataScienceSurveyBannerLogger);
serviceManager.addSingleton<IInteractiveWindowProvider>(IInteractiveWindowProvider, InteractiveWindowProvider);
serviceManager.addSingleton<IJupyterDebugger>(IJupyterDebugger, JupyterDebugger, undefined, [ICellHashListener]);
serviceManager.addSingleton<IJupyterExecution>(IJupyterExecution, JupyterExecutionFactory);
serviceManager.addSingleton<IJupyterPasswordConnect>(IJupyterPasswordConnect, JupyterPasswordConnect);
serviceManager.addSingleton<IJupyterSessionManagerFactory>(IJupyterSessionManagerFactory, JupyterSessionManagerFactory);
serviceManager.addSingleton<IExtensionSingleActivationService>(IExtensionSingleActivationService, DebuggerVariableRegistration);
serviceManager.addSingleton<IJupyterVariables>(IJupyterVariables, JupyterVariables, Identifiers.ALL_VARIABLES);
serviceManager.addSingleton<IJupyterVariables>(IJupyterVariables, OldJupyterVariables, Identifiers.OLD_VARIABLES);
serviceManager.addSingleton<IJupyterVariables>(IJupyterVariables, KernelVariables, Identifiers.KERNEL_VARIABLES);
serviceManager.addSingleton<IJupyterVariables>(IJupyterVariables, DebuggerVariables, Identifiers.DEBUGGER_VARIABLES);
serviceManager.addSingleton<IPlotViewerProvider>(IPlotViewerProvider, PlotViewerProvider);
serviceManager.addSingleton<IStatusProvider>(IStatusProvider, StatusProvider);
serviceManager.addSingleton<IThemeFinder>(IThemeFinder, ThemeFinder);
serviceManager.addSingleton<JupyterCommandLineSelector>(JupyterCommandLineSelector, JupyterCommandLineSelector);
serviceManager.addSingleton<JupyterCommandLineSelectorCommand>(JupyterCommandLineSelectorCommand, JupyterCommandLineSelectorCommand);
serviceManager.addSingleton<JupyterInterpreterDependencyService>(JupyterInterpreterDependencyService, JupyterInterpreterDependencyService);
serviceManager.addSingleton<JupyterInterpreterOldCacheStateStore>(JupyterInterpreterOldCacheStateStore, JupyterInterpreterOldCacheStateStore);
serviceManager.addSingleton<JupyterInterpreterSelector>(JupyterInterpreterSelector, JupyterInterpreterSelector);
serviceManager.addSingleton<JupyterInterpreterService>(JupyterInterpreterService, JupyterInterpreterService);
serviceManager.addSingleton<JupyterInterpreterStateStore>(JupyterInterpreterStateStore, JupyterInterpreterStateStore);
serviceManager.addSingleton<JupyterServerSelector>(JupyterServerSelector, JupyterServerSelector);
serviceManager.addSingleton<JupyterServerSelectorCommand>(JupyterServerSelectorCommand, JupyterServerSelectorCommand);
serviceManager.addSingleton<KernelSelectionProvider>(KernelSelectionProvider, KernelSelectionProvider);
serviceManager.addSingleton<KernelSelector>(KernelSelector, KernelSelector);
serviceManager.addSingleton<KernelService>(KernelService, KernelService);
serviceManager.addSingleton<KernelSwitcher>(KernelSwitcher, KernelSwitcher);
serviceManager.addSingleton<NotebookCommands>(NotebookCommands, NotebookCommands);
serviceManager.addSingleton<NotebookStarter>(NotebookStarter, NotebookStarter);
serviceManager.addSingleton<ProgressReporter>(ProgressReporter, ProgressReporter);
serviceManager.addSingleton<INotebookProvider>(INotebookProvider, NotebookProvider);
serviceManager.addSingleton<IJupyterServerProvider>(IJupyterServerProvider, NotebookServerProvider);
serviceManager.addSingleton<IPyWidgetMessageDispatcherFactory>(IPyWidgetMessageDispatcherFactory, IPyWidgetMessageDispatcherFactory);
serviceManager.addSingleton<IJupyterInterpreterDependencyManager>(IJupyterInterpreterDependencyManager, JupyterInterpreterSubCommandExecutionService);
serviceManager.addSingleton<IJupyterSubCommandExecutionService>(IJupyterSubCommandExecutionService, JupyterInterpreterSubCommandExecutionService);
serviceManager.addSingleton<KernelDaemonPool>(KernelDaemonPool, KernelDaemonPool);
serviceManager.addSingleton<IKernelDependencyService>(IKernelDependencyService, KernelDependencyService);
serviceManager.addSingleton<INotebookAndInteractiveWindowUsageTracker>(INotebookAndInteractiveWindowUsageTracker, NotebookAndInteractiveWindowUsageTracker);
serviceManager.addSingleton<KernelDaemonPreWarmer>(KernelDaemonPreWarmer, KernelDaemonPreWarmer);
serviceManager.addSingleton<IStartPage>(IStartPage, StartPage, undefined, [IExtensionSingleActivationService]);
serviceManager.add<IProtocolParser>(IProtocolParser, ProtocolParser);
serviceManager.addSingleton<IJupyterDebugService>(IJupyterDebugService, MultiplexingDebugService, Identifiers.MULTIPLEXING_DEBUGSERVICE);
serviceManager.addSingleton<IJupyterDebugService>(IJupyterDebugService, JupyterDebugService, Identifiers.RUN_BY_LINE_DEBUGSERVICE);
serviceManager.add<IJupyterVariableDataProvider>(IJupyterVariableDataProvider, JupyterVariableDataProvider);
serviceManager.addSingleton<IJupyterVariableDataProviderFactory>(IJupyterVariableDataProviderFactory, JupyterVariableDataProviderFactory);
serviceManager.addSingleton<IExportManager>(IExportManager, ExportManager);
serviceManager.addSingleton<ExportDependencyChecker>(ExportDependencyChecker, ExportDependencyChecker);
serviceManager.addSingleton<ExportFileOpener>(ExportFileOpener, ExportFileOpener);
serviceManager.addSingleton<IExport>(IExport, ExportToPDF, ExportFormat.pdf);
serviceManager.addSingleton<IExport>(IExport, ExportToHTML, ExportFormat.html);
serviceManager.addSingleton<IExport>(IExport, ExportToPython, ExportFormat.python);
serviceManager.addSingleton<IExport>(IExport, ExportBase, 'Export Base');
serviceManager.addSingleton<ExportUtil>(ExportUtil, ExportUtil);
serviceManager.addSingleton<ExportCommands>(ExportCommands, ExportCommands);
serviceManager.addSingleton<IExportManagerFilePicker>(IExportManagerFilePicker, ExportManagerFilePicker);
serviceManager.addSingleton<IJupyterUriProviderRegistration>(IJupyterUriProviderRegistration, JupyterUriProviderRegistration);
serviceManager.addSingleton<IDigestStorage>(IDigestStorage, DigestStorage);
serviceManager.addSingleton<ITrustService>(ITrustService, TrustService);
serviceManager.addSingleton<IDataScienceFileSystem>(IDataScienceFileSystem, DataScienceFileSystem);
serviceManager.addSingleton<IFileSystemPathUtils>(IFileSystemPathUtils, FileSystemPathUtils);
serviceManager.addSingleton<INotebookExtensibility>(INotebookExtensibility, NotebookExtensibility);
registerGatherTypes(serviceManager);
registerNotebookTypes(serviceManager);
}
export function registerGatherTypes(serviceManager: IServiceManager) {
serviceManager.add<IGatherLogger>(IGatherLogger, GatherLogger, undefined, [INotebookExecutionLogger]);
}