mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-31 09:35:39 -05:00
This commit is contained in:
@@ -93,7 +93,13 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
}
|
||||
|
||||
public get notebookManager(): INotebookManager {
|
||||
return this.notebookManagers.find(manager => manager.providerId === this._providerId);
|
||||
let manager = this.notebookManagers.find(manager => manager.providerId === this._providerId);
|
||||
if (!manager) {
|
||||
// Note: this seems like a less than ideal scenario. We should ideally pass in the "correct" provider ID and allow there to be a default,
|
||||
// instead of assuming in the NotebookModel constructor that the option is either SQL or Jupyter
|
||||
manager = this.notebookManagers.find(manager => manager.providerId === DEFAULT_NOTEBOOK_PROVIDER);
|
||||
}
|
||||
return manager;
|
||||
}
|
||||
|
||||
public get notebookUri(): URI {
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
import { RenderMimeRegistry } from 'sql/parts/notebook/outputs/registry';
|
||||
import { standardRendererFactories } from 'sql/parts/notebook/outputs/factories';
|
||||
import { LocalContentManager } from 'sql/workbench/services/notebook/node/localContentManager';
|
||||
import { SessionManager } from 'sql/workbench/services/notebook/common/sessionManager';
|
||||
import { SessionManager, noKernel } from 'sql/workbench/services/notebook/common/sessionManager';
|
||||
import { Extensions, INotebookProviderRegistry, NotebookProviderRegistration } from 'sql/workbench/services/notebook/common/notebookRegistry';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Memento } from 'vs/workbench/common/memento';
|
||||
@@ -359,7 +359,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
notebookRegistry.registerNotebookProvider({
|
||||
provider: defaultProvider.providerId,
|
||||
fileExtensions: DEFAULT_NOTEBOOK_FILETYPE,
|
||||
standardKernels: []
|
||||
standardKernels: { name: noKernel, connectionProviderIds: [] }
|
||||
});
|
||||
} else {
|
||||
let sqlProvider = new SqlNotebookProvider(this._instantiationService);
|
||||
|
||||
Reference in New Issue
Block a user