mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 09:35:37 -05:00
SQL Kernel Improvements/Removing Spark Code from Core/Attach to Changes (#3790)
* Scenarios work besides loading saved kernel * Fix compilation issue * Save and load functional * Fix loading kernesl issue when sql kernel is not enabled * Fix language mapping to not be hardcoded any longer * Remove unnecessary comment * PR Comments vol. 1 * Code cleanup, use ConnectionProfile instead of IConnectionProfile when accessing serverName * PR changes vol. 2 * One final comment for PR * Fix linting issue
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
import { NotebookInputModel, NotebookInput } from 'sql/parts/notebook/notebookInput';
|
||||
import { INotebookService, INotebookEditor, DEFAULT_NOTEBOOK_PROVIDER } from 'sql/workbench/services/notebook/common/notebookService';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import { getProvidersForFileName } from 'sql/parts/notebook/notebookUtils';
|
||||
import { getProvidersForFileName, getStandardKernelsForProvider } from 'sql/parts/notebook/notebookUtils';
|
||||
import { ISingleNotebookEditOperation } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { disposed } from 'vs/base/common/errors';
|
||||
import { ICellModel, NotebookContentChange } from 'sql/parts/notebook/models/modelInterfaces';
|
||||
@@ -332,6 +332,11 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
}
|
||||
model.providers = providers;
|
||||
model.providerId = providerId;
|
||||
model.defaultKernel = options && options.defaultKernel;
|
||||
model.providers.forEach(provider => {
|
||||
let standardKernels = getStandardKernelsForProvider(provider, this._notebookService);
|
||||
model.standardKernels = standardKernels;
|
||||
});
|
||||
let input = this._instantiationService.createInstance(NotebookInput, undefined, model);
|
||||
|
||||
let editor = await this._editorService.openEditor(input, editorOptions, viewColumnToEditorGroup(this._editorGroupService, options.position));
|
||||
|
||||
Reference in New Issue
Block a user