mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fixes for broken notebook experience (#8944)
* Fixes for broken notebook experience * add sql carbon edit * sql carbon edit * add another sql carbon edit for import * Set untitledResource instead of no resource
This commit is contained in:
@@ -458,7 +458,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
|||||||
};
|
};
|
||||||
let isUntitled: boolean = uri.scheme === Schemas.untitled;
|
let isUntitled: boolean = uri.scheme === Schemas.untitled;
|
||||||
|
|
||||||
const fileInput = isUntitled ? this._untitledEditorService.create({ associatedResource: uri, mode: 'notebook', initialValue: options.initialContent }) :
|
const fileInput = isUntitled ? this._untitledEditorService.create({ untitledResource: uri, mode: 'notebook', initialValue: options.initialContent }) :
|
||||||
this._editorService.createInput({ resource: uri, mode: 'notebook' });
|
this._editorService.createInput({ resource: uri, mode: 'notebook' });
|
||||||
let input: NotebookInput;
|
let input: NotebookInput;
|
||||||
if (isUntitled) {
|
if (isUntitled) {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { URI } from 'vs/base/common/uri';
|
|||||||
import { Disposable, IDisposable, toDisposable, DisposableStore, dispose } from 'vs/base/common/lifecycle';
|
import { Disposable, IDisposable, toDisposable, DisposableStore, dispose } from 'vs/base/common/lifecycle';
|
||||||
import { TernarySearchTree, values } from 'vs/base/common/map';
|
import { TernarySearchTree, values } from 'vs/base/common/map';
|
||||||
import { ISaveOptions, IRevertOptions } from 'vs/workbench/common/editor';
|
import { ISaveOptions, IRevertOptions } from 'vs/workbench/common/editor';
|
||||||
|
import { Schemas } from 'vs/base/common/network'; // {{SQL CARBON EDIT}} @chlafreniere need to block working copies of notebook editors from being tracked
|
||||||
|
|
||||||
export const enum WorkingCopyCapabilities {
|
export const enum WorkingCopyCapabilities {
|
||||||
|
|
||||||
@@ -138,6 +139,11 @@ export class WorkingCopyService extends Disposable implements IWorkingCopyServic
|
|||||||
registerWorkingCopy(workingCopy: IWorkingCopy): IDisposable {
|
registerWorkingCopy(workingCopy: IWorkingCopy): IDisposable {
|
||||||
const disposables = new DisposableStore();
|
const disposables = new DisposableStore();
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}} @chlafreniere need to block working copies of notebook editors from being tracked
|
||||||
|
if (workingCopy.resource.path.includes('notebook-editor-') && workingCopy.resource.scheme === Schemas.untitled) {
|
||||||
|
return disposables;
|
||||||
|
}
|
||||||
|
|
||||||
// Registry
|
// Registry
|
||||||
let workingCopiesForResource = this.mapResourceToWorkingCopy.get(workingCopy.resource.toString());
|
let workingCopiesForResource = this.mapResourceToWorkingCopy.get(workingCopy.resource.toString());
|
||||||
if (!workingCopiesForResource) {
|
if (!workingCopiesForResource) {
|
||||||
|
|||||||
Reference in New Issue
Block a user