[Notebook] Run Parameters Action openNotebook Functionality in Core (#14978)

* NotebookService update

* openNotebook functionality in NbService

* Add tests for RunParametersAction
This commit is contained in:
Vasu Bhog
2021-04-08 14:48:37 -07:00
committed by GitHub
parent 4f67f32262
commit d76a6698a9
18 changed files with 245 additions and 101 deletions

View File

@@ -13,6 +13,7 @@ import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileE
import { UntitledTextEditorInput } from 'vs/workbench/services/untitled/common/untitledTextEditorInput';
import { ILanguageAssociation } from 'sql/workbench/services/languageAssociation/common/languageAssociation';
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
import { NotebookLanguage } from 'sql/workbench/common/constants';
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
import { DiffNotebookInput } from 'sql/workbench/contrib/notebook/browser/models/diffNotebookInput';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
@@ -20,7 +21,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
const editorInputFactoryRegistry = Registry.as<IEditorInputFactoryRegistry>(EditorInputExtensions.EditorInputFactories);
export class NotebookEditorInputAssociation implements ILanguageAssociation {
static readonly languages = ['notebook', 'ipynb'];
static readonly languages = [NotebookLanguage.Notebook, NotebookLanguage.Ipynb];
constructor(@IInstantiationService private readonly instantiationService: IInstantiationService, @IConfigurationService private readonly configurationService: IConfigurationService) { }

View File

@@ -34,6 +34,7 @@ import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel'
import { NotebookFindModel } from 'sql/workbench/contrib/notebook/browser/find/notebookFindModel';
import { onUnexpectedError } from 'vs/base/common/errors';
import { NotebookModel } from 'sql/workbench/services/notebook/browser/models/notebookModel';
import { INotebookInput } from 'sql/workbench/services/notebook/browser/interface';
export type ModeViewSaveHandler = (handle: number) => Thenable<boolean>;
@@ -209,7 +210,7 @@ export class NotebookEditorModel extends EditorModel {
type TextInput = ResourceEditorInput | UntitledTextEditorInput | FileEditorInput;
export abstract class NotebookInput extends EditorInput {
export abstract class NotebookInput extends EditorInput implements INotebookInput {
private _providerId: string;
private _providers: string[];
private _standardKernels: IStandardKernelWithProvider[];