Add placeholders for missing VSCode notebook events that are used by the Jupyter extension. (#18138)

* Also reduced the number of timeouts for waiting on notebook provider descriptors, and fixed an issue with undefined cancellation tokens in vscode notebook conversion code.
This commit is contained in:
Cory Rivera
2022-01-25 14:03:33 -08:00
committed by GitHub
parent f0dd31c457
commit 9685393975
9 changed files with 182 additions and 164 deletions

View File

@@ -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.");

View File

@@ -54,10 +54,27 @@ export class ExtHostNotebookDocumentsAndEditors implements ExtHostNotebookDocume
private readonly _onDidChangeActiveVSCodeEditor = new Emitter<vscode.NotebookEditor>();
private readonly _onDidOpenVSCodeNotebook = new Emitter<vscode.NotebookDocument>();
private readonly _onDidCloseVSCodeNotebook = new Emitter<vscode.NotebookDocument>();
private readonly _onDidSaveVSCodeNotebook = new Emitter<vscode.NotebookDocument>();
private readonly _onDidChangeVSCodeCellMetadata = new Emitter<vscode.NotebookCellMetadataChangeEvent>();
private readonly _onDidChangeVSCodeDocumentMetadata = new Emitter<vscode.NotebookDocumentMetadataChangeEvent>();
private readonly _onDidChangeVSCodeCellOutputs = new Emitter<vscode.NotebookCellOutputsChangeEvent>();
private readonly _onDidChangeVSCodeNotebookCells = new Emitter<vscode.NotebookCellsChangeEvent>();
private readonly _onDidChangeVSCodeExecutionState = new Emitter<vscode.NotebookCellExecutionStateChangeEvent>();
private readonly _onDidChangeVSCodeEditorSelection = new Emitter<vscode.NotebookEditorSelectionChangeEvent>();
private readonly _onDidChangeVSCodeEditorRanges = new Emitter<vscode.NotebookEditorVisibleRangesChangeEvent>();
readonly onDidChangeVisibleVSCodeEditors: Event<vscode.NotebookEditor[]> = this._onDidChangeVisibleVSCodeEditors.event;
readonly onDidChangeActiveVSCodeEditor: Event<vscode.NotebookEditor> = this._onDidChangeActiveVSCodeEditor.event;
readonly onDidOpenVSCodeNotebookDocument: Event<vscode.NotebookDocument> = this._onDidOpenVSCodeNotebook.event;
readonly onDidCloseVSCodeNotebookDocument: Event<vscode.NotebookDocument> = this._onDidCloseVSCodeNotebook.event;
readonly onDidSaveVSCodeNotebookDocument: Event<vscode.NotebookDocument> = this._onDidSaveVSCodeNotebook.event;
readonly onDidChangeVSCodeCellMetadata: Event<vscode.NotebookCellMetadataChangeEvent> = this._onDidChangeVSCodeCellMetadata.event;
readonly onDidChangeVSCodeDocumentMetadata: Event<vscode.NotebookDocumentMetadataChangeEvent> = this._onDidChangeVSCodeDocumentMetadata.event;
readonly onDidChangeVSCodeCellOutputs: Event<vscode.NotebookCellOutputsChangeEvent> = this._onDidChangeVSCodeCellOutputs.event;
readonly onDidChangeVSCodeNotebookCells: Event<vscode.NotebookCellsChangeEvent> = this._onDidChangeVSCodeNotebookCells.event;
readonly onDidChangeVSCodeExecutionState: Event<vscode.NotebookCellExecutionStateChangeEvent> = this._onDidChangeVSCodeExecutionState.event;
readonly onDidChangeVSCodeEditorSelection: Event<vscode.NotebookEditorSelectionChangeEvent> = this._onDidChangeVSCodeEditorSelection.event;
readonly onDidChangeVSCodeEditorRanges: Event<vscode.NotebookEditorVisibleRangesChangeEvent> = this._onDidChangeVSCodeEditorRanges.event;
constructor(
private readonly _mainContext: IMainContext,

View File

@@ -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 {

View File

@@ -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
}
}

View File

@@ -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<azdata.nb.INotebookContents> {
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<string> {
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();
}

View File

@@ -179,7 +179,7 @@ export class NotebookService extends Disposable implements INotebookService {
private _onNotebookEditorRename = new Emitter<INotebookEditor>();
private _editors = new Map<string, INotebookEditor>();
private _fileToProviderDescriptions = new Map<string, ProviderDescriptionRegistration[]>();
private _providerToStandardKernels = new Map<string, StandardKernelsDescriptor>();
private _providerToStandardKernels = new Map<string, StandardKernelsDescriptor>(); // Note: providerId key here should be in upper case
private _registrationComplete = new Deferred<void>();
private _isRegistrationComplete = false;
private _trustedCacheQueue: URI[] = [];
@@ -693,6 +693,7 @@ export class NotebookService extends Disposable implements INotebookService {
providerDescriptor.instanceReady,
new Promise<ISerializationProvider | undefined>((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<IExecuteProvider | undefined>((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<nb.IStandardKernel[] | undefined>((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);

View File

@@ -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));
});
});

View File

@@ -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<vscode.NotebookEditor> {
// {{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<vscode.NotebookDocument> {
// {{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

View File

@@ -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<IConfigurationRegistry>(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
}
});
*/