mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"description": "Defines the Data-procotol based Notebook contribution and many Notebook commands and contributions.",
|
"description": "Defines the Data-procotol based Notebook contribution and many Notebook commands and contributions.",
|
||||||
"notebook.configuration.title": "Notebook configuration",
|
"notebook.configuration.title": "Notebook configuration",
|
||||||
"notebook.pythonPath.description": "Local path to python installation used by Notebooks.",
|
"notebook.pythonPath.description": "Local path to python installation used by Notebooks.",
|
||||||
"notebook.sqlKernelEnabled.description": "Enable SQL kernel in notebook editor (Preview)",
|
"notebook.sqlKernelEnabled.description": "Enable SQL kernel in notebook editor (Preview). Requires reloading this window to take effect",
|
||||||
"notebook.command.new": "New Notebook",
|
"notebook.command.new": "New Notebook",
|
||||||
"notebook.command.open": "Open Notebook"
|
"notebook.command.open": "Open Notebook"
|
||||||
}
|
}
|
||||||
@@ -93,7 +93,13 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get notebookManager(): INotebookManager {
|
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 {
|
public get notebookUri(): URI {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
import { RenderMimeRegistry } from 'sql/parts/notebook/outputs/registry';
|
import { RenderMimeRegistry } from 'sql/parts/notebook/outputs/registry';
|
||||||
import { standardRendererFactories } from 'sql/parts/notebook/outputs/factories';
|
import { standardRendererFactories } from 'sql/parts/notebook/outputs/factories';
|
||||||
import { LocalContentManager } from 'sql/workbench/services/notebook/node/localContentManager';
|
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 { Extensions, INotebookProviderRegistry, NotebookProviderRegistration } from 'sql/workbench/services/notebook/common/notebookRegistry';
|
||||||
import { Emitter, Event } from 'vs/base/common/event';
|
import { Emitter, Event } from 'vs/base/common/event';
|
||||||
import { Memento } from 'vs/workbench/common/memento';
|
import { Memento } from 'vs/workbench/common/memento';
|
||||||
@@ -359,7 +359,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
|||||||
notebookRegistry.registerNotebookProvider({
|
notebookRegistry.registerNotebookProvider({
|
||||||
provider: defaultProvider.providerId,
|
provider: defaultProvider.providerId,
|
||||||
fileExtensions: DEFAULT_NOTEBOOK_FILETYPE,
|
fileExtensions: DEFAULT_NOTEBOOK_FILETYPE,
|
||||||
standardKernels: []
|
standardKernels: { name: noKernel, connectionProviderIds: [] }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
let sqlProvider = new SqlNotebookProvider(this._instantiationService);
|
let sqlProvider = new SqlNotebookProvider(this._instantiationService);
|
||||||
|
|||||||
Reference in New Issue
Block a user