Skip to content

Commit

Permalink
Fix for SQL Kernel only showing up (microsoft#4691)
Browse files Browse the repository at this point in the history
* Ensure that notebook providers that are registered "early" are shown in kernels dropdown

* cleanup
  • Loading branch information
chlafreniere authored Mar 25, 2019
1 parent b27417d commit 1bac929
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ export class NotebookService extends Disposable implements INotebookService {
super();
this._memento = new Memento('notebookProviders', this._storageService);
this._register(notebookRegistry.onNewRegistration(this.updateRegisteredProviders, this));
// If a provider has been already registered, the onNewRegistration event will not have a listener attached yet
// So, explicitly updating registered providers here.
if (notebookRegistry.providers.length > 0) {
notebookRegistry.providers.forEach(p => {
this.updateRegisteredProviders({id: p.provider, registration: p});
});
}
this.registerBuiltInProvider();

if (extensionService) {
Expand Down

0 comments on commit 1bac929

Please sign in to comment.