diff --git a/src/sql/base/common/locConstants.ts b/src/sql/base/common/locConstants.ts index 49b3099614..c5fc5884ae 100644 --- a/src/sql/base/common/locConstants.ts +++ b/src/sql/base/common/locConstants.ts @@ -49,3 +49,4 @@ export const workspaceTrustDescription = localize('workspace.trust.description', export function workspaceTrustEmptyWindowDescription(settingName: string): string { return localize('workspace.trust.emptyWindow.description', "Controls whether or not the empty window is trusted by default within Azure Data Studio. When used with `#{0}#`, you can enable the full functionality of Azure Data Studio without prompting in an empty window.", settingName); } export const functionalityNotSupportedError = localize('vscodeFunctionalityNotSupportedError', "This VS Code functionality is not supported in Azure Data Studio."); export const invalidArgumentsError = localize('vscodeInvalidArgumentsError', "Invalid arguments"); +export const cellToolbarCompatibilityMessage = localize('notebook.cellToolbarLocation.compatibilityDescription', "Where the cell toolbar should be shown, or whether it should be hidden. Note: This setting is only enabled for extension compatibility purposes, and so does not affect anything."); diff --git a/src/sql/workbench/api/common/extHostNotebookDocumentsAndEditors.ts b/src/sql/workbench/api/common/extHostNotebookDocumentsAndEditors.ts index 58f786721c..59711096ea 100644 --- a/src/sql/workbench/api/common/extHostNotebookDocumentsAndEditors.ts +++ b/src/sql/workbench/api/common/extHostNotebookDocumentsAndEditors.ts @@ -54,10 +54,27 @@ export class ExtHostNotebookDocumentsAndEditors implements ExtHostNotebookDocume private readonly _onDidChangeActiveVSCodeEditor = new Emitter(); private readonly _onDidOpenVSCodeNotebook = new Emitter(); private readonly _onDidCloseVSCodeNotebook = new Emitter(); + private readonly _onDidSaveVSCodeNotebook = new Emitter(); + private readonly _onDidChangeVSCodeCellMetadata = new Emitter(); + private readonly _onDidChangeVSCodeDocumentMetadata = new Emitter(); + private readonly _onDidChangeVSCodeCellOutputs = new Emitter(); + private readonly _onDidChangeVSCodeNotebookCells = new Emitter(); + private readonly _onDidChangeVSCodeExecutionState = new Emitter(); + private readonly _onDidChangeVSCodeEditorSelection = new Emitter(); + private readonly _onDidChangeVSCodeEditorRanges = new Emitter(); + readonly onDidChangeVisibleVSCodeEditors: Event = this._onDidChangeVisibleVSCodeEditors.event; readonly onDidChangeActiveVSCodeEditor: Event = this._onDidChangeActiveVSCodeEditor.event; readonly onDidOpenVSCodeNotebookDocument: Event = this._onDidOpenVSCodeNotebook.event; readonly onDidCloseVSCodeNotebookDocument: Event = this._onDidCloseVSCodeNotebook.event; + readonly onDidSaveVSCodeNotebookDocument: Event = this._onDidSaveVSCodeNotebook.event; + readonly onDidChangeVSCodeCellMetadata: Event = this._onDidChangeVSCodeCellMetadata.event; + readonly onDidChangeVSCodeDocumentMetadata: Event = this._onDidChangeVSCodeDocumentMetadata.event; + readonly onDidChangeVSCodeCellOutputs: Event = this._onDidChangeVSCodeCellOutputs.event; + readonly onDidChangeVSCodeNotebookCells: Event = this._onDidChangeVSCodeNotebookCells.event; + readonly onDidChangeVSCodeExecutionState: Event = this._onDidChangeVSCodeExecutionState.event; + readonly onDidChangeVSCodeEditorSelection: Event = this._onDidChangeVSCodeEditorSelection.event; + readonly onDidChangeVSCodeEditorRanges: Event = this._onDidChangeVSCodeEditorRanges.event; constructor( private readonly _mainContext: IMainContext, diff --git a/src/sql/workbench/api/common/notebooks/adsNotebookController.ts b/src/sql/workbench/api/common/notebooks/adsNotebookController.ts index 836cb1149b..0ee6fe7a32 100644 --- a/src/sql/workbench/api/common/notebooks/adsNotebookController.ts +++ b/src/sql/workbench/api/common/notebooks/adsNotebookController.ts @@ -14,6 +14,7 @@ import { URI } from 'vs/base/common/uri'; import { NotebookCellExecutionTaskState } from 'vs/workbench/api/common/extHostNotebookKernels'; import { asArray } from 'vs/base/common/arrays'; import { convertToADSCellOutput } from 'sql/workbench/api/common/notebooks/notebookUtils'; +import { CancellationToken } from 'vs/base/common/cancellation'; type SelectionChangedEvent = { selected: boolean, notebook: vscode.NotebookDocument; }; type MessageReceivedEvent = { editor: vscode.NotebookEditor, message: any; }; @@ -173,7 +174,7 @@ class ADSNotebookCellExecution implements vscode.NotebookCellExecution { } public get token(): vscode.CancellationToken { - return undefined; + return CancellationToken.None; } public get executionOrder(): number { diff --git a/src/sql/workbench/api/common/notebooks/vscodeNotebookEditor.ts b/src/sql/workbench/api/common/notebooks/vscodeNotebookEditor.ts index 52fb4eed2e..ba9ba2f9a4 100644 --- a/src/sql/workbench/api/common/notebooks/vscodeNotebookEditor.ts +++ b/src/sql/workbench/api/common/notebooks/vscodeNotebookEditor.ts @@ -40,6 +40,6 @@ export class VSCodeNotebookEditor implements vscode.NotebookEditor { } public setDecorations(decorationType: vscode.NotebookEditorDecorationType, range: vscode.NotebookRange): void { - throw new Error(functionalityNotSupportedError); + // No-op } } diff --git a/src/sql/workbench/api/common/notebooks/vscodeSerializationProvider.ts b/src/sql/workbench/api/common/notebooks/vscodeSerializationProvider.ts index 7cbe7bd4c5..2d0fd4d60f 100644 --- a/src/sql/workbench/api/common/notebooks/vscodeSerializationProvider.ts +++ b/src/sql/workbench/api/common/notebooks/vscodeSerializationProvider.ts @@ -6,7 +6,7 @@ import type * as vscode from 'vscode'; import type * as azdata from 'azdata'; import { VSBuffer } from 'vs/base/common/buffer'; -import { CancellationTokenSource } from 'vs/base/common/cancellation'; +import { CancellationToken } from 'vs/base/common/cancellation'; import { convertToADSNotebookContents, convertToVSCodeNotebookData } from 'sql/workbench/api/common/notebooks/notebookUtils'; export class VSCodeContentManager implements azdata.nb.ContentManager { @@ -15,13 +15,13 @@ export class VSCodeContentManager implements azdata.nb.ContentManager { public async deserializeNotebook(contents: string): Promise { let buffer = VSBuffer.fromString(contents); - let notebookData = await this._serializer.deserializeNotebook(buffer.buffer, new CancellationTokenSource().token); + let notebookData = await this._serializer.deserializeNotebook(buffer.buffer, CancellationToken.None); return convertToADSNotebookContents(notebookData); } public async serializeNotebook(notebook: azdata.nb.INotebookContents): Promise { let notebookData = convertToVSCodeNotebookData(notebook); - let bytes = await this._serializer.serializeNotebook(notebookData, new CancellationTokenSource().token); + let bytes = await this._serializer.serializeNotebook(notebookData, CancellationToken.None); let buffer = VSBuffer.wrap(bytes); return buffer.toString(); } diff --git a/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts b/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts index 544615fb89..649ae3806c 100644 --- a/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts +++ b/src/sql/workbench/services/notebook/browser/notebookServiceImpl.ts @@ -179,7 +179,7 @@ export class NotebookService extends Disposable implements INotebookService { private _onNotebookEditorRename = new Emitter(); private _editors = new Map(); private _fileToProviderDescriptions = new Map(); - private _providerToStandardKernels = new Map(); + private _providerToStandardKernels = new Map(); // Note: providerId key here should be in upper case private _registrationComplete = new Deferred(); private _isRegistrationComplete = false; private _trustedCacheQueue: URI[] = []; @@ -693,6 +693,7 @@ export class NotebookService extends Disposable implements INotebookService { providerDescriptor.instanceReady, new Promise((resolve, reject) => setTimeout(() => { if (!providerDescriptor.instance) { + this._serializationProviders.delete(providerDescriptor.providerId); // Remove waiting descriptor so we don't timeout again onUnexpectedError(localize('serializationProviderTimeout', 'Waiting for Serialization Provider availability timed out for notebook provider \'{0}\'', providerDescriptor.providerId)); } resolve(undefined); @@ -708,6 +709,7 @@ export class NotebookService extends Disposable implements INotebookService { providerDescriptor.instanceReady, new Promise((resolve, reject) => setTimeout(() => { if (!providerDescriptor.instance) { + this._executeProviders.delete(providerDescriptor.providerId); // Remove waiting descriptor so we don't timeout again onUnexpectedError(localize('executeProviderTimeout', 'Waiting for Execute Provider availability timed out for notebook provider \'{0}\'', providerDescriptor.providerId)); } resolve(undefined); @@ -723,6 +725,7 @@ export class NotebookService extends Disposable implements INotebookService { kernelsDescriptor.instanceReady, new Promise((resolve, reject) => setTimeout(() => { if (!kernelsDescriptor.instance) { + this._providerToStandardKernels.delete(kernelsDescriptor.providerId.toUpperCase()); // Remove waiting descriptor so we don't timeout again onUnexpectedError(localize('standardKernelsTimeout', 'Waiting for Standard Kernels availability timed out for notebook provider \'{0}\'', kernelsDescriptor.providerId)); } resolve(undefined); diff --git a/src/sql/workbench/test/electron-browser/api/vscodeNotebookApi.test.ts b/src/sql/workbench/test/electron-browser/api/vscodeNotebookApi.test.ts index fac8229066..169535928a 100644 --- a/src/sql/workbench/test/electron-browser/api/vscodeNotebookApi.test.ts +++ b/src/sql/workbench/test/electron-browser/api/vscodeNotebookApi.test.ts @@ -459,7 +459,6 @@ suite('Notebook Serializer', () => { assert.throws(() => vscodeEditor.visibleRanges); assert.throws(() => vscodeEditor.viewColumn); assert.throws(() => vscodeEditor.revealRange(undefined)); - assert.throws(() => vscodeEditor.setDecorations(undefined, undefined)); await assert.rejects(() => vscodeEditor.edit(() => undefined)); }); }); diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 89ba1797ab..a2efe5d178 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -98,6 +98,7 @@ import { ExtHostNotebookDocumentsAndEditors } from 'sql/workbench/api/common/ext import { VSCodeNotebookDocument } from 'sql/workbench/api/common/notebooks/vscodeNotebookDocument'; import { VSCodeNotebookEditor } from 'sql/workbench/api/common/notebooks/vscodeNotebookEditor'; import { convertToADSNotebookContents } from 'sql/workbench/api/common/notebooks/notebookUtils'; +import { IdGenerator } from 'vs/base/common/idGenerator'; export interface IExtensionApiFactory { (extension: IExtensionDescription, registry: ExtensionDescriptionRegistry, configProvider: ExtHostConfigProvider): typeof vscode; @@ -211,6 +212,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor, ex // Register API-ish commands ExtHostApiCommands.register(extHostCommands); + // {{SQL CARBON EDIT}} Used for creating stubbed out DecorationTypes for compatibility purposes + const DecorationTypeKeys = new IdGenerator('VSCodeNotebookEditorDecorationType'); + return function (extension: IExtensionDescription, extensionRegistry: ExtensionDescriptionRegistry, configProvider: ExtHostConfigProvider): typeof vscode { // Check document selectors for being overly generic. Technically this isn't a problem but @@ -736,16 +740,12 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor, ex return extHostNotebookDocumentsAndEditors.onDidChangeVisibleVSCodeEditors; }, onDidChangeNotebookEditorSelection(listener, thisArgs?, disposables?) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebookEditors.onDidChangeNotebookEditorSelection(listener, thisArgs, disposables); + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidChangeVSCodeEditorSelection(listener, thisArgs, disposables); }, onDidChangeNotebookEditorVisibleRanges(listener, thisArgs?, disposables?) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebookEditors.onDidChangeNotebookEditorVisibleRanges(listener, thisArgs, disposables); + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidChangeVSCodeEditorRanges(listener, thisArgs, disposables); }, showNotebookDocument(uriOrDocument: URI | vscode.NotebookDocument, options?: vscode.NotebookDocumentShowOptions): Thenable { // {{SQL CARBON EDIT}} Use our own notebooks @@ -1164,52 +1164,46 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor, ex // return extHostNotebook.registerNotebookCellStatusBarItemProvider(extension, notebookType, provider); }, get onDidSaveNotebookDocument(): Event { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebookDocuments.onDidSaveNotebookDocument; + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidSaveVSCodeNotebookDocument; }, createNotebookEditorDecorationType(options: vscode.NotebookDecorationRenderOptions): vscode.NotebookEditorDecorationType { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebookEditors.createNotebookEditorDecorationType(options); + // {{SQL CARBON EDIT}} Use our own notebooks + // Returning this stub class for now, since we don't support renderer contributions yet + return { + key: DecorationTypeKeys.nextId(), + dispose: () => undefined + }; }, createRendererMessaging(rendererId) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebookRenderers.createRendererMessaging(extension, rendererId); + // {{SQL CARBON EDIT}} Use our own notebooks + // Returning this stub class for now, since we don't support renderer contributions yet + let receivedMessage = new Emitter<{ editor: vscode.NotebookEditor, message: any }>(); + let rendererMessaging: vscode.NotebookRendererMessaging = { + onDidReceiveMessage: (listener, thisArg, disposables) => receivedMessage.event(listener, thisArg, disposables), + postMessage: () => Promise.resolve(false) + }; + return rendererMessaging; }, onDidChangeNotebookDocumentMetadata(listener, thisArgs?, disposables?) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebookDocuments.onDidChangeNotebookDocumentMetadata(listener, thisArgs, disposables); + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidChangeVSCodeDocumentMetadata(listener, thisArgs, disposables); }, onDidChangeNotebookCells(listener, thisArgs?, disposables?) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebook.onDidChangeNotebookCells(listener, thisArgs, disposables); + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidChangeVSCodeNotebookCells(listener, thisArgs, disposables); }, onDidChangeNotebookCellExecutionState(listener, thisArgs?, disposables?) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebook.onDidChangeNotebookCellExecutionState(listener, thisArgs, disposables); + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidChangeVSCodeExecutionState(listener, thisArgs, disposables); }, onDidChangeCellOutputs(listener, thisArgs?, disposables?) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebook.onDidChangeCellOutputs(listener, thisArgs, disposables); + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidChangeVSCodeCellOutputs(listener, thisArgs, disposables); }, onDidChangeCellMetadata(listener, thisArgs?, disposables?) { - // {{SQL CARBON EDIT}} Disable VS Code notebooks - throw new Error(functionalityNotSupportedError); - // checkProposedApiEnabled(extension); - // return extHostNotebook.onDidChangeCellMetadata(listener, thisArgs, disposables); + // {{SQL CARBON EDIT}} Use our own notebooks + return extHostNotebookDocumentsAndEditors.onDidChangeVSCodeCellMetadata(listener, thisArgs, disposables); }, createConcatTextDocument(notebook, selector) { // {{SQL CARBON EDIT}} Disable VS Code notebooks diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index 8a9555f795..4796e8af84 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -15,8 +15,8 @@ import { ITextModel, ITextBufferFactory, DefaultEndOfLine, ITextBuffer } from 'v import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextModelContentProvider, ITextModelService } from 'vs/editor/common/services/resolverService'; -// import * as nls from 'vs/nls'; {{SQL CARBON EDIT}} Remove unused -import { IConfigurationPropertySchema } from 'vs/platform/configuration/common/configurationRegistry'; // {{SQL CARBON EDIT}} Remove unused +import * as nls from 'vs/nls'; +import { Extensions, IConfigurationPropertySchema, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; // {{SQL CARBON EDIT}} Remove unused import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -30,7 +30,7 @@ import { NotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookEd import { isCompositeNotebookEditorInput, NotebookEditorInput, NotebookEditorInputOptions } from 'vs/workbench/contrib/notebook/common/notebookEditorInput'; import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService'; import { NotebookService } from 'vs/workbench/contrib/notebook/browser/notebookServiceImpl'; -import { CellKind, CellUri, UndoRedoPerCell, IResolvedNotebookEditorModel, NotebookDocumentBackupData, NotebookWorkingCopyTypeIdentifier, IOutputItemDto } from 'vs/workbench/contrib/notebook/common/notebookCommon'; // {{SQL CARBON EDIT}} Remove unused +import { CellKind, CellUri, UndoRedoPerCell, IResolvedNotebookEditorModel, NotebookDocumentBackupData, NotebookWorkingCopyTypeIdentifier, IOutputItemDto, CellToolbarLocation } from 'vs/workbench/contrib/notebook/common/notebookCommon'; // {{SQL CARBON EDIT}} Remove unused import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IUndoRedoService } from 'vs/platform/undoRedo/common/undoRedo'; import { INotebookEditorModelResolverService } from 'vs/workbench/contrib/notebook/common/notebookEditorModelResolverService'; @@ -93,6 +93,7 @@ import { NotebookExecutionService } from 'vs/workbench/contrib/notebook/browser/ import { INotebookExecutionService } from 'vs/workbench/contrib/notebook/common/notebookExecutionService'; import { INotebookKeymapService } from 'vs/workbench/contrib/notebook/common/notebookKeymapService'; import { NotebookKeymapService } from 'vs/workbench/contrib/notebook/browser/notebookKeymapServiceImpl'; +import { cellToolbarCompatibilityMessage } from 'sql/base/common/locConstants'; /*--------------------------------------------------------------------------------------------- */ @@ -650,6 +651,7 @@ const editorOptionsCustomizationSchema: IConfigurationPropertySchema = { ], tags: ['notebookLayout'] }; +*/ const configurationRegistry = Registry.as(Extensions.Configuration); configurationRegistry.registerConfiguration({ @@ -658,16 +660,17 @@ configurationRegistry.registerConfiguration({ title: nls.localize('notebookConfigurationTitle', "Notebook"), type: 'object', properties: { - [DisplayOrderKey]: { - description: nls.localize('notebook.displayOrder.description', "Priority list for output mime types"), - type: ['array'], - items: { - type: 'string' - }, - default: [] - }, + // {{SQL CARBON EDIT}} Remove unused VS Code Notebook configurations + // [DisplayOrderKey]: { + // description: nls.localize('notebook.displayOrder.description', "Priority list for output mime types"), + // type: ['array'], + // items: { + // type: 'string' + // }, + // default: [] + // }, [CellToolbarLocation]: { - description: nls.localize('notebook.cellToolbarLocation.description', "Where the cell toolbar should be shown, or whether it should be hidden."), + description: cellToolbarCompatibilityMessage, // {{SQL CARBON EDIT}} type: 'object', additionalProperties: { markdownDescription: nls.localize('notebook.cellToolbarLocation.viewType', "Configure the cell toolbar position for for specific file types"), @@ -679,110 +682,110 @@ configurationRegistry.registerConfiguration({ }, tags: ['notebookLayout'] }, - [ShowCellStatusBar]: { - description: nls.localize('notebook.showCellStatusbar.description', "Whether the cell status bar should be shown."), - type: 'string', - enum: ['hidden', 'visible', 'visibleAfterExecute'], - enumDescriptions: [ - nls.localize('notebook.showCellStatusbar.hidden.description', "The cell Status bar is always hidden."), - nls.localize('notebook.showCellStatusbar.visible.description', "The cell Status bar is always visible."), - nls.localize('notebook.showCellStatusbar.visibleAfterExecute.description', "The cell Status bar is hidden until the cell has executed. Then it becomes visible to show the execution status.")], - default: 'visible', - tags: ['notebookLayout'] - }, - [NotebookTextDiffEditorPreview]: { - description: nls.localize('notebook.diff.enablePreview.description', "Whether to use the enhanced text diff editor for notebook."), - type: 'boolean', - default: true, - tags: ['notebookLayout'] - }, - [CellToolbarVisibility]: { - markdownDescription: nls.localize('notebook.cellToolbarVisibility.description', "Whether the cell toolbar should appear on hover or click."), - type: 'string', - enum: ['hover', 'click'], - default: 'click', - tags: ['notebookLayout'] - }, - [UndoRedoPerCell]: { - description: nls.localize('notebook.undoRedoPerCell.description', "Whether to use separate undo/redo stack for each cell."), - type: 'boolean', - default: true, - tags: ['notebookLayout'] - }, - [CompactView]: { - description: nls.localize('notebook.compactView.description', "Control whether the notebook editor should be rendered in a compact form. "), - type: 'boolean', - default: true, - tags: ['notebookLayout'] - }, - [FocusIndicator]: { - description: nls.localize('notebook.focusIndicator.description', "Controls where the focus indicator is rendered, either along the cell borders or on the left gutter"), - type: 'string', - enum: ['border', 'gutter'], - default: 'gutter', - tags: ['notebookLayout'] - }, - [InsertToolbarLocation]: { - description: nls.localize('notebook.insertToolbarPosition.description', "Control where the insert cell actions should appear."), - type: 'string', - enum: ['betweenCells', 'notebookToolbar', 'both', 'hidden'], - enumDescriptions: [ - nls.localize('insertToolbarLocation.betweenCells', "A toolbar that appears on hover between cells."), - nls.localize('insertToolbarLocation.notebookToolbar', "The toolbar at the top of the notebook editor."), - nls.localize('insertToolbarLocation.both', "Both toolbars."), - nls.localize('insertToolbarLocation.hidden', "The insert actions don't appear anywhere."), - ], - default: 'both', - tags: ['notebookLayout'] - }, - [GlobalToolbar]: { - description: nls.localize('notebook.globalToolbar.description', "Control whether to render a global toolbar inside the notebook editor."), - type: 'boolean', - default: true, - tags: ['notebookLayout'] - }, - [ConsolidatedOutputButton]: { - description: nls.localize('notebook.consolidatedOutputButton.description', "Control whether outputs action should be rendered in the output toolbar."), - type: 'boolean', - default: true, - tags: ['notebookLayout'] - }, - [ShowFoldingControls]: { - description: nls.localize('notebook.showFoldingControls.description', "Controls when the Markdown header folding arrow is shown."), - type: 'string', - enum: ['always', 'mouseover'], - enumDescriptions: [ - nls.localize('showFoldingControls.always', "The folding controls are always visible."), - nls.localize('showFoldingControls.mouseover', "The folding controls are visible only on mouseover."), - ], - default: 'mouseover', - tags: ['notebookLayout'] - }, - [DragAndDropEnabled]: { - description: nls.localize('notebook.dragAndDrop.description', "Control whether the notebook editor should allow moving cells through drag and drop."), - type: 'boolean', - default: true, - tags: ['notebookLayout'] - }, - [ConsolidatedRunButton]: { - description: nls.localize('notebook.consolidatedRunButton.description', "Control whether extra actions are shown in a dropdown next to the run button."), - type: 'boolean', - default: false, - tags: ['notebookLayout'] - }, - [GlobalToolbarShowLabel]: { - description: nls.localize('notebook.globalToolbarShowLabel', "Control whether the actions on the notebook toolbar should render label or not."), - type: 'boolean', - default: true, - tags: ['notebookLayout'] - }, - [TextOutputLineLimit]: { - description: nls.localize('notebook.textOutputLineLimit', "Control how many lines of text in a text output is rendered."), - type: 'number', - default: 30, - tags: ['notebookLayout'] - }, - [NotebookCellEditorOptionsCustomizations]: editorOptionsCustomizationSchema + // {{SQL CARBON EDIT}} Remove unused VS Code Notebook configurations + // [ShowCellStatusBar]: { + // description: nls.localize('notebook.showCellStatusbar.description', "Whether the cell status bar should be shown."), + // type: 'string', + // enum: ['hidden', 'visible', 'visibleAfterExecute'], + // enumDescriptions: [ + // nls.localize('notebook.showCellStatusbar.hidden.description', "The cell Status bar is always hidden."), + // nls.localize('notebook.showCellStatusbar.visible.description', "The cell Status bar is always visible."), + // nls.localize('notebook.showCellStatusbar.visibleAfterExecute.description', "The cell Status bar is hidden until the cell has executed. Then it becomes visible to show the execution status.")], + // default: 'visible', + // tags: ['notebookLayout'] + // }, + // [NotebookTextDiffEditorPreview]: { + // description: nls.localize('notebook.diff.enablePreview.description', "Whether to use the enhanced text diff editor for notebook."), + // type: 'boolean', + // default: true, + // tags: ['notebookLayout'] + // }, + // [CellToolbarVisibility]: { + // markdownDescription: nls.localize('notebook.cellToolbarVisibility.description', "Whether the cell toolbar should appear on hover or click."), + // type: 'string', + // enum: ['hover', 'click'], + // default: 'click', + // tags: ['notebookLayout'] + // }, + // [UndoRedoPerCell]: { + // description: nls.localize('notebook.undoRedoPerCell.description', "Whether to use separate undo/redo stack for each cell."), + // type: 'boolean', + // default: true, + // tags: ['notebookLayout'] + // }, + // [CompactView]: { + // description: nls.localize('notebook.compactView.description', "Control whether the notebook editor should be rendered in a compact form. "), + // type: 'boolean', + // default: true, + // tags: ['notebookLayout'] + // }, + // [FocusIndicator]: { + // description: nls.localize('notebook.focusIndicator.description', "Controls where the focus indicator is rendered, either along the cell borders or on the left gutter"), + // type: 'string', + // enum: ['border', 'gutter'], + // default: 'gutter', + // tags: ['notebookLayout'] + // }, + // [InsertToolbarLocation]: { + // description: nls.localize('notebook.insertToolbarPosition.description', "Control where the insert cell actions should appear."), + // type: 'string', + // enum: ['betweenCells', 'notebookToolbar', 'both', 'hidden'], + // enumDescriptions: [ + // nls.localize('insertToolbarLocation.betweenCells', "A toolbar that appears on hover between cells."), + // nls.localize('insertToolbarLocation.notebookToolbar', "The toolbar at the top of the notebook editor."), + // nls.localize('insertToolbarLocation.both', "Both toolbars."), + // nls.localize('insertToolbarLocation.hidden', "The insert actions don't appear anywhere."), + // ], + // default: 'both', + // tags: ['notebookLayout'] + // }, + // [GlobalToolbar]: { + // description: nls.localize('notebook.globalToolbar.description', "Control whether to render a global toolbar inside the notebook editor."), + // type: 'boolean', + // default: true, + // tags: ['notebookLayout'] + // }, + // [ConsolidatedOutputButton]: { + // description: nls.localize('notebook.consolidatedOutputButton.description', "Control whether outputs action should be rendered in the output toolbar."), + // type: 'boolean', + // default: true, + // tags: ['notebookLayout'] + // }, + // [ShowFoldingControls]: { + // description: nls.localize('notebook.showFoldingControls.description', "Controls when the Markdown header folding arrow is shown."), + // type: 'string', + // enum: ['always', 'mouseover'], + // enumDescriptions: [ + // nls.localize('showFoldingControls.always', "The folding controls are always visible."), + // nls.localize('showFoldingControls.mouseover', "The folding controls are visible only on mouseover."), + // ], + // default: 'mouseover', + // tags: ['notebookLayout'] + // }, + // [DragAndDropEnabled]: { + // description: nls.localize('notebook.dragAndDrop.description', "Control whether the notebook editor should allow moving cells through drag and drop."), + // type: 'boolean', + // default: true, + // tags: ['notebookLayout'] + // }, + // [ConsolidatedRunButton]: { + // description: nls.localize('notebook.consolidatedRunButton.description', "Control whether extra actions are shown in a dropdown next to the run button."), + // type: 'boolean', + // default: false, + // tags: ['notebookLayout'] + // }, + // [GlobalToolbarShowLabel]: { + // description: nls.localize('notebook.globalToolbarShowLabel', "Control whether the actions on the notebook toolbar should render label or not."), + // type: 'boolean', + // default: true, + // tags: ['notebookLayout'] + // }, + // [TextOutputLineLimit]: { + // description: nls.localize('notebook.textOutputLineLimit', "Control how many lines of text in a text output is rendered."), + // type: 'number', + // default: 30, + // tags: ['notebookLayout'] + // }, + // [NotebookCellEditorOptionsCustomizations]: editorOptionsCustomizationSchema } }); -*/