notebook resolve should wait for * activated events.

This commit is contained in:
rebornix 2020-06-01 13:17:33 -07:00
parent f9ca74dcf1
commit 7e9abe577d
2 changed files with 4 additions and 2 deletions

View file

@ -6,8 +6,7 @@
"license": "MIT",
"private": true,
"activationEvents": [
"*",
"onNotebookEditor:notebookCoreTest"
"*"
],
"main": "./out/notebookTestMain",
"enableProposedApi": true,

View file

@ -203,6 +203,9 @@ export class NotebookService extends Disposable implements INotebookService, ICu
async canResolve(viewType: string): Promise<boolean> {
if (!this._notebookProviders.has(viewType)) {
await this.extensionService.whenInstalledExtensionsRegistered();
// notebook providers/kernels/renderers might use `*` as activation event.
await this.extensionService.activateByEvent(`*`);
// this awaits full activation of all matching extensions
await this.extensionService.activateByEvent(`onNotebookEditor:${viewType}`);
}