MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / activateLegacy

Function activateLegacy

src/extension.node.ts:213–241  ·  view source on GitHub ↗
(
    context: IExtensionContext,
    serviceManager: IServiceManager,
    serviceContainer: IServiceContainer
)

Source from the content-addressed store, hash-verified

211// See https://github.com/microsoft/vscode-python/issues/10454.
212
213async function activateLegacy(
214 context: IExtensionContext,
215 serviceManager: IServiceManager,
216 serviceContainer: IServiceContainer
217) {
218 // register "services"
219 const isDevMode =
220 !isTestExecution() &&
221 (context.extensionMode === ExtensionMode.Development ||
222 workspace.getConfiguration('deepnote').get<boolean>('development', false));
223 serviceManager.addSingletonInstance<boolean>(IsDevMode, isDevMode);
224 if (isDevMode) {
225 commands.executeCommand('setContext', 'deepnote.development', true).then(noop, noop);
226 }
227 commands.executeCommand('setContext', 'deepnote.webExtension', false).then(noop, noop);
228
229 // Set the logger home dir (we can compute this in a node app)
230 setHomeDirectory(homedir());
231
232 // Register the rest of the types (platform is first because it's needed by others)
233 registerPlatformTypes(serviceManager);
234 registerKernelTypes(serviceManager, isDevMode);
235 registerNotebookTypes(serviceManager, isDevMode);
236 registerInteractiveTypes(serviceManager);
237 registerStandaloneTypes(context, serviceManager, isDevMode);
238 registerWebviewTypes(serviceManager);
239
240 await postActivateLegacy(context, serviceContainer);
241}

Callers 1

activateUnsafeFunction · 0.70

Calls 7

isTestExecutionFunction · 0.90
setHomeDirectoryFunction · 0.90
postActivateLegacyFunction · 0.90
getConfigurationMethod · 0.80
getMethod · 0.65
addSingletonInstanceMethod · 0.65
executeCommandMethod · 0.65

Tested by

no test coverage detected