mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 01:25:38 -05:00
Nb/show notebooks as untitled (#6376)
* open notebooks as untitled files and removed the saving to home directory * return just filename without extension since save is adding the .ipynb ext * Changes to open bdc notebooks as untitled docs. Updated tests to align with the changes * changes: not to show untitled file as dirty and cleaned up tests in notebookService * changes to address untitled name conflicts with open editors. * comment cleanup
This commit is contained in:
@@ -460,6 +460,9 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let untitledModel = await input.textInput.resolve();
|
||||
await untitledModel.load();
|
||||
input.untitledEditorModel = untitledModel;
|
||||
if (options.initialDirtyState === false) {
|
||||
input.untitledEditorModel.setDirty(false);
|
||||
}
|
||||
}
|
||||
let editor = await this._editorService.openEditor(input, editorOptions, viewColumnToEditorGroup(this._editorGroupService, options.position));
|
||||
if (!editor) {
|
||||
|
||||
@@ -206,6 +206,7 @@ export class ExtHostNotebookDocumentsAndEditors implements ExtHostNotebookDocume
|
||||
options.initialContent = showOptions.initialContent;
|
||||
}
|
||||
}
|
||||
options.initialDirtyState = showOptions.initialDirtyState;
|
||||
}
|
||||
let id = await this._proxy.$tryShowNotebookDocument(uri, options);
|
||||
let editor = this.getEditor(id);
|
||||
|
||||
@@ -908,6 +908,7 @@ export interface INotebookShowOptions {
|
||||
connectionProfile?: azdata.IConnectionProfile;
|
||||
defaultKernel?: azdata.nb.IKernelSpec;
|
||||
initialContent?: string;
|
||||
initialDirtyState?: boolean;
|
||||
}
|
||||
|
||||
export interface ExtHostNotebookDocumentsAndEditorsShape {
|
||||
|
||||
Reference in New Issue
Block a user