@codingame/monaco-vscode-notebook-service-override 37.1.0 → 37.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -2
- package/package.json +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +210 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +140 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +194 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +149 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +372 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +43 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +19 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +32 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +13 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +30 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +11 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +38 -38
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +30 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +68 -68
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +35 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +8 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +15 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +26 -26
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.d.ts +87 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +352 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +44 -18
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +14 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +5 -5
|
@@ -9,8 +9,8 @@ import { registerAction2, MenuId, MenuRegistry } from '@codingame/monaco-vscode-
|
|
|
9
9
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
10
10
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
11
11
|
import { IDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
12
|
-
import { CTX_INLINE_CHAT_FOCUSED } from '@codingame/monaco-vscode-
|
|
13
|
-
import { insertCell } from '@codingame/monaco-vscode-
|
|
12
|
+
import { CTX_INLINE_CHAT_FOCUSED } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
13
|
+
import { insertCell } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
|
|
14
14
|
import { NotebookAction, getContextFromUri, getContextFromActiveEditor, NotebookMultiCellAction, cellExecutionArgs, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, parseMultiCellExecutionArgs, CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder, NotebookCellAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
15
15
|
import { CellEditState, EXECUTE_CELL_COMMAND_ID, ScrollToRevealBehavior, CellFocusMode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
16
16
|
import { executeAllIcon, executeIcon, executeAboveIcon, executeBelowIcon, stopIcon, executingStateIcon, errorStateIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
@@ -148,7 +148,7 @@ registerAction2(class RenderAllMarkdownCellsAction extends NotebookAction {
|
|
|
148
148
|
constructor() {
|
|
149
149
|
super({
|
|
150
150
|
id: RENDER_ALL_MARKDOWN_CELLS,
|
|
151
|
-
title: ( localize(
|
|
151
|
+
title: ( localize(16656, "Render All Markdown Cells"))
|
|
152
152
|
});
|
|
153
153
|
}
|
|
154
154
|
async runWithContext(accessor, context) {
|
|
@@ -159,10 +159,10 @@ registerAction2(class ExecuteNotebookAction extends NotebookAction {
|
|
|
159
159
|
constructor() {
|
|
160
160
|
super({
|
|
161
161
|
id: EXECUTE_NOTEBOOK_COMMAND_ID,
|
|
162
|
-
title: ( localize(
|
|
162
|
+
title: ( localize(16657, "Run All")),
|
|
163
163
|
icon: executeAllIcon,
|
|
164
164
|
metadata: {
|
|
165
|
-
description: ( localize(
|
|
165
|
+
description: ( localize(16657, "Run All")),
|
|
166
166
|
args: [{
|
|
167
167
|
name: "uri",
|
|
168
168
|
description: "The document uri"
|
|
@@ -205,7 +205,7 @@ registerAction2(class ExecuteCell extends NotebookMultiCellAction {
|
|
|
205
205
|
super({
|
|
206
206
|
id: EXECUTE_CELL_COMMAND_ID,
|
|
207
207
|
precondition: executeThisCellCondition,
|
|
208
|
-
title: ( localize(
|
|
208
|
+
title: ( localize(16658, "Execute Cell")),
|
|
209
209
|
keybinding: {
|
|
210
210
|
when: NOTEBOOK_CELL_LIST_FOCUSED,
|
|
211
211
|
primary: KeyMod.WinCtrl | KeyCode.Enter,
|
|
@@ -220,7 +220,7 @@ registerAction2(class ExecuteCell extends NotebookMultiCellAction {
|
|
|
220
220
|
group: "inline"
|
|
221
221
|
},
|
|
222
222
|
metadata: {
|
|
223
|
-
description: ( localize(
|
|
223
|
+
description: ( localize(16658, "Execute Cell")),
|
|
224
224
|
args: cellExecutionArgs
|
|
225
225
|
},
|
|
226
226
|
icon: executeIcon
|
|
@@ -245,7 +245,7 @@ registerAction2(class ExecuteAboveCells extends NotebookMultiCellAction {
|
|
|
245
245
|
super({
|
|
246
246
|
id: EXECUTE_CELLS_ABOVE,
|
|
247
247
|
precondition: executeCondition,
|
|
248
|
-
title: ( localize(
|
|
248
|
+
title: ( localize(16659, "Execute Above Cells")),
|
|
249
249
|
menu: [{
|
|
250
250
|
id: MenuId.NotebookCellExecute,
|
|
251
251
|
when: ( ContextKeyExpr.and(executeCondition, ( ContextKeyExpr.equals(`config.${NotebookSetting.consolidatedRunButton}`, true))))
|
|
@@ -269,7 +269,9 @@ registerAction2(class ExecuteAboveCells extends NotebookMultiCellAction {
|
|
|
269
269
|
skipReveal: true
|
|
270
270
|
});
|
|
271
271
|
} else {
|
|
272
|
-
endCellIdx = Math.min(
|
|
272
|
+
endCellIdx = Math.min(
|
|
273
|
+
...context.selectedCells.map(cell => context.notebookEditor.getCellIndex(cell))
|
|
274
|
+
);
|
|
273
275
|
}
|
|
274
276
|
if (typeof endCellIdx === "number") {
|
|
275
277
|
const range = {
|
|
@@ -286,7 +288,7 @@ registerAction2(class ExecuteCellAndBelow extends NotebookMultiCellAction {
|
|
|
286
288
|
super({
|
|
287
289
|
id: EXECUTE_CELL_AND_BELOW,
|
|
288
290
|
precondition: executeCondition,
|
|
289
|
-
title: ( localize(
|
|
291
|
+
title: ( localize(16660, "Execute Cell and Below")),
|
|
290
292
|
menu: [{
|
|
291
293
|
id: MenuId.NotebookCellExecute,
|
|
292
294
|
when: ( ContextKeyExpr.and(executeCondition, ( ContextKeyExpr.equals(`config.${NotebookSetting.consolidatedRunButton}`, true))))
|
|
@@ -310,7 +312,9 @@ registerAction2(class ExecuteCellAndBelow extends NotebookMultiCellAction {
|
|
|
310
312
|
skipReveal: true
|
|
311
313
|
});
|
|
312
314
|
} else {
|
|
313
|
-
startCellIdx = Math.min(
|
|
315
|
+
startCellIdx = Math.min(
|
|
316
|
+
...context.selectedCells.map(cell => context.notebookEditor.getCellIndex(cell))
|
|
317
|
+
);
|
|
314
318
|
}
|
|
315
319
|
if (typeof startCellIdx === "number") {
|
|
316
320
|
const range = {
|
|
@@ -327,9 +331,9 @@ registerAction2(class ExecuteCellFocusContainer extends NotebookMultiCellAction
|
|
|
327
331
|
super({
|
|
328
332
|
id: EXECUTE_CELL_FOCUS_CONTAINER_COMMAND_ID,
|
|
329
333
|
precondition: executeThisCellCondition,
|
|
330
|
-
title: ( localize(
|
|
334
|
+
title: ( localize(16661, "Execute Cell and Focus Container")),
|
|
331
335
|
metadata: {
|
|
332
|
-
description: ( localize(
|
|
336
|
+
description: ( localize(16661, "Execute Cell and Focus Container")),
|
|
333
337
|
args: cellExecutionArgs
|
|
334
338
|
},
|
|
335
339
|
icon: executeIcon
|
|
@@ -362,7 +366,7 @@ registerAction2(class CancelExecuteCell extends NotebookMultiCellAction {
|
|
|
362
366
|
super({
|
|
363
367
|
id: CANCEL_CELL_COMMAND_ID,
|
|
364
368
|
precondition: cellCancelCondition,
|
|
365
|
-
title: ( localize(
|
|
369
|
+
title: ( localize(16662, "Stop Cell Execution")),
|
|
366
370
|
icon: stopIcon,
|
|
367
371
|
menu: {
|
|
368
372
|
id: MenuId.NotebookCellExecutePrimary,
|
|
@@ -370,7 +374,7 @@ registerAction2(class CancelExecuteCell extends NotebookMultiCellAction {
|
|
|
370
374
|
group: "inline"
|
|
371
375
|
},
|
|
372
376
|
metadata: {
|
|
373
|
-
description: ( localize(
|
|
377
|
+
description: ( localize(16662, "Stop Cell Execution")),
|
|
374
378
|
args: [{
|
|
375
379
|
name: "options",
|
|
376
380
|
description: "The cell range options",
|
|
@@ -422,7 +426,7 @@ registerAction2(class ExecuteCellSelectBelow extends NotebookCellAction {
|
|
|
422
426
|
super({
|
|
423
427
|
id: EXECUTE_CELL_SELECT_BELOW,
|
|
424
428
|
precondition: ( ContextKeyExpr.or(executeThisCellCondition, ( NOTEBOOK_CELL_TYPE.isEqualTo("markup")))),
|
|
425
|
-
title: ( localize(
|
|
429
|
+
title: ( localize(16663, "Execute Notebook Cell and Select Below")),
|
|
426
430
|
keybinding: {
|
|
427
431
|
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( CTX_INLINE_CHAT_FOCUSED.negate()))),
|
|
428
432
|
primary: KeyMod.Shift | KeyCode.Enter,
|
|
@@ -481,7 +485,7 @@ registerAction2(class ExecuteCellInsertBelow extends NotebookCellAction {
|
|
|
481
485
|
super({
|
|
482
486
|
id: EXECUTE_CELL_INSERT_BELOW,
|
|
483
487
|
precondition: ( ContextKeyExpr.or(executeThisCellCondition, ( NOTEBOOK_CELL_TYPE.isEqualTo("markup")))),
|
|
484
|
-
title: ( localize(
|
|
488
|
+
title: ( localize(16664, "Execute Notebook Cell and Insert Below")),
|
|
485
489
|
keybinding: {
|
|
486
490
|
when: NOTEBOOK_CELL_LIST_FOCUSED,
|
|
487
491
|
primary: KeyMod.Alt | KeyCode.Enter,
|
|
@@ -524,7 +528,7 @@ registerAction2(class CancelAllNotebook extends CancelNotebook {
|
|
|
524
528
|
constructor() {
|
|
525
529
|
super({
|
|
526
530
|
id: CANCEL_NOTEBOOK_COMMAND_ID,
|
|
527
|
-
title: ( localize2(
|
|
531
|
+
title: ( localize2(16665, "Stop Execution")),
|
|
528
532
|
icon: stopIcon,
|
|
529
533
|
menu: [{
|
|
530
534
|
id: MenuId.EditorTitle,
|
|
@@ -544,7 +548,7 @@ registerAction2(class InterruptNotebook extends CancelNotebook {
|
|
|
544
548
|
constructor() {
|
|
545
549
|
super({
|
|
546
550
|
id: INTERRUPT_NOTEBOOK_COMMAND_ID,
|
|
547
|
-
title: ( localize2(
|
|
551
|
+
title: ( localize2(16666, "Interrupt")),
|
|
548
552
|
precondition: ( ContextKeyExpr.and(NOTEBOOK_HAS_SOMETHING_RUNNING, NOTEBOOK_INTERRUPTIBLE_KERNEL)),
|
|
549
553
|
icon: stopIcon,
|
|
550
554
|
menu: [{
|
|
@@ -574,7 +578,7 @@ registerAction2(class InterruptNotebook extends CancelNotebook {
|
|
|
574
578
|
}
|
|
575
579
|
});
|
|
576
580
|
MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
577
|
-
title: ( localize(
|
|
581
|
+
title: ( localize(16667, "Go To")),
|
|
578
582
|
submenu: MenuId.NotebookCellExecuteGoTo,
|
|
579
583
|
group: "navigation/execute",
|
|
580
584
|
order: 20,
|
|
@@ -584,9 +588,9 @@ registerAction2(class RevealRunningCellAction extends NotebookAction {
|
|
|
584
588
|
constructor() {
|
|
585
589
|
super({
|
|
586
590
|
id: REVEAL_RUNNING_CELL,
|
|
587
|
-
title: ( localize(
|
|
588
|
-
tooltip: ( localize(
|
|
589
|
-
shortTitle: ( localize(
|
|
591
|
+
title: ( localize(16668, "Go to Running Cell")),
|
|
592
|
+
tooltip: ( localize(16668, "Go to Running Cell")),
|
|
593
|
+
shortTitle: ( localize(16668, "Go to Running Cell")),
|
|
590
594
|
precondition: NOTEBOOK_HAS_RUNNING_CELL,
|
|
591
595
|
menu: [{
|
|
592
596
|
id: MenuId.EditorTitle,
|
|
@@ -640,9 +644,9 @@ registerAction2(class RevealLastFailedCellAction extends NotebookAction {
|
|
|
640
644
|
constructor() {
|
|
641
645
|
super({
|
|
642
646
|
id: REVEAL_LAST_FAILED_CELL,
|
|
643
|
-
title: ( localize(
|
|
644
|
-
tooltip: ( localize(
|
|
645
|
-
shortTitle: ( localize(
|
|
647
|
+
title: ( localize(16669, "Go to Most Recently Failed Cell")),
|
|
648
|
+
tooltip: ( localize(16669, "Go to Most Recently Failed Cell")),
|
|
649
|
+
shortTitle: ( localize(16670, "Go to Most Recently Failed Cell")),
|
|
646
650
|
precondition: NOTEBOOK_LAST_CELL_FAILED,
|
|
647
651
|
menu: [{
|
|
648
652
|
id: MenuId.EditorTitle,
|
|
@@ -23,7 +23,7 @@ registerAction2(class NotebookConfigureLayoutAction extends Action2 {
|
|
|
23
23
|
constructor() {
|
|
24
24
|
super({
|
|
25
25
|
id: "workbench.notebook.layout.select",
|
|
26
|
-
title: ( localize2(
|
|
26
|
+
title: ( localize2(16689, "Select between Notebook Layouts")),
|
|
27
27
|
f1: true,
|
|
28
28
|
precondition: ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)),
|
|
29
29
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
@@ -51,7 +51,7 @@ registerAction2(class NotebookConfigureLayoutAction extends Action2 {
|
|
|
51
51
|
constructor() {
|
|
52
52
|
super({
|
|
53
53
|
id: "workbench.notebook.layout.configure",
|
|
54
|
-
title: ( localize2(
|
|
54
|
+
title: ( localize2(16690, "Customize Notebook Layout")),
|
|
55
55
|
f1: true,
|
|
56
56
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
57
57
|
menu: [{
|
|
@@ -73,7 +73,7 @@ registerAction2(class NotebookConfigureLayoutFromEditorTitle extends Action2 {
|
|
|
73
73
|
constructor() {
|
|
74
74
|
super({
|
|
75
75
|
id: "workbench.notebook.layout.configure.editorTitle",
|
|
76
|
-
title: ( localize2(
|
|
76
|
+
title: ( localize2(16690, "Customize Notebook Layout")),
|
|
77
77
|
f1: false,
|
|
78
78
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
79
79
|
menu: [{
|
|
@@ -93,7 +93,7 @@ registerAction2(class NotebookConfigureLayoutFromEditorTitle extends Action2 {
|
|
|
93
93
|
});
|
|
94
94
|
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
|
95
95
|
submenu: MenuId.NotebookEditorLayoutConfigure,
|
|
96
|
-
title: ( localize2(
|
|
96
|
+
title: ( localize2(16691, "Customize Notebook...")),
|
|
97
97
|
icon: Codicon.gear,
|
|
98
98
|
group: "navigation",
|
|
99
99
|
order: -1,
|
|
@@ -103,8 +103,8 @@ registerAction2(class ToggleLineNumberFromEditorTitle extends Action2 {
|
|
|
103
103
|
constructor() {
|
|
104
104
|
super({
|
|
105
105
|
id: "notebook.toggleLineNumbersFromEditorTitle",
|
|
106
|
-
title: ( localize2(
|
|
107
|
-
shortTitle: ( localize2(
|
|
106
|
+
title: ( localize2(16692, "Toggle Notebook Line Numbers")),
|
|
107
|
+
shortTitle: ( localize2(16693, "Line Numbers")),
|
|
108
108
|
precondition: NOTEBOOK_EDITOR_FOCUSED,
|
|
109
109
|
menu: [{
|
|
110
110
|
id: MenuId.NotebookEditorLayoutConfigure,
|
|
@@ -116,7 +116,7 @@ registerAction2(class ToggleLineNumberFromEditorTitle extends Action2 {
|
|
|
116
116
|
f1: true,
|
|
117
117
|
toggled: {
|
|
118
118
|
condition: ( ContextKeyExpr.notEquals("config.notebook.lineNumbers", "off")),
|
|
119
|
-
title: ( localize(
|
|
119
|
+
title: ( localize(16694, "Line Numbers"))
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
122
|
}
|
|
@@ -128,7 +128,7 @@ registerAction2(class ToggleCellToolbarPositionFromEditorTitle extends Action2 {
|
|
|
128
128
|
constructor() {
|
|
129
129
|
super({
|
|
130
130
|
id: "notebook.toggleCellToolbarPositionFromEditorTitle",
|
|
131
|
-
title: ( localize2(
|
|
131
|
+
title: ( localize2(16695, "Toggle Cell Toolbar Position")),
|
|
132
132
|
menu: [{
|
|
133
133
|
id: MenuId.NotebookEditorLayoutConfigure,
|
|
134
134
|
group: "notebookLayoutDetails",
|
|
@@ -146,11 +146,11 @@ registerAction2(class ToggleBreadcrumbFromEditorTitle extends Action2 {
|
|
|
146
146
|
constructor() {
|
|
147
147
|
super({
|
|
148
148
|
id: "breadcrumbs.toggleFromEditorTitle",
|
|
149
|
-
title: ( localize2(
|
|
150
|
-
shortTitle: ( localize2(
|
|
149
|
+
title: ( localize2(16696, "Toggle Breadcrumbs")),
|
|
150
|
+
shortTitle: ( localize2(16697, "Breadcrumbs")),
|
|
151
151
|
toggled: {
|
|
152
152
|
condition: ( ContextKeyExpr.equals("config.breadcrumbs.enabled", true)),
|
|
153
|
-
title: ( localize(
|
|
153
|
+
title: ( localize(16698, "Breadcrumbs"))
|
|
154
154
|
},
|
|
155
155
|
menu: [{
|
|
156
156
|
id: MenuId.NotebookEditorLayoutConfigure,
|
|
@@ -169,7 +169,7 @@ registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
|
|
|
169
169
|
constructor() {
|
|
170
170
|
super({
|
|
171
171
|
id: "notebook.saveMimeTypeOrder",
|
|
172
|
-
title: ( localize2(
|
|
172
|
+
title: ( localize2(16699, "Save Mimetype Display Order")),
|
|
173
173
|
f1: true,
|
|
174
174
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
175
175
|
precondition: NOTEBOOK_IS_ACTIVE_EDITOR
|
|
@@ -179,13 +179,13 @@ registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
|
|
|
179
179
|
const service = accessor.get(INotebookService);
|
|
180
180
|
const disposables = ( new DisposableStore());
|
|
181
181
|
const qp = disposables.add(accessor.get(IQuickInputService).createQuickPick());
|
|
182
|
-
qp.placeholder = ( localize(
|
|
182
|
+
qp.placeholder = ( localize(16700, "Settings file to save in"));
|
|
183
183
|
qp.items = [{
|
|
184
184
|
target: ConfigurationTarget.USER,
|
|
185
|
-
label: ( localize(
|
|
185
|
+
label: ( localize(16701, "User Settings"))
|
|
186
186
|
}, {
|
|
187
187
|
target: ConfigurationTarget.WORKSPACE,
|
|
188
|
-
label: ( localize(
|
|
188
|
+
label: ( localize(16702, "Workspace Settings"))
|
|
189
189
|
}];
|
|
190
190
|
disposables.add(qp.onDidAccept(() => {
|
|
191
191
|
const target = qp.selectedItems[0]?.target;
|
|
@@ -202,7 +202,7 @@ registerAction2(class NotebookWebviewResetAction extends Action2 {
|
|
|
202
202
|
constructor() {
|
|
203
203
|
super({
|
|
204
204
|
id: "workbench.notebook.layout.webview.reset",
|
|
205
|
-
title: ( localize2(
|
|
205
|
+
title: ( localize2(16703, "Reset Notebook Webview")),
|
|
206
206
|
f1: false,
|
|
207
207
|
category: NOTEBOOK_ACTIONS_CATEGORY
|
|
208
208
|
});
|
|
@@ -232,15 +232,15 @@ registerAction2(class ToggleNotebookStickyScroll extends Action2 {
|
|
|
232
232
|
super({
|
|
233
233
|
id: "notebook.action.toggleNotebookStickyScroll",
|
|
234
234
|
title: {
|
|
235
|
-
...( localize2(
|
|
236
|
-
mnemonicTitle: ( localize(
|
|
235
|
+
...( localize2(16704, "Toggle Notebook Sticky Scroll")),
|
|
236
|
+
mnemonicTitle: ( localize(16705, "&&Sticky Scroll"))
|
|
237
237
|
},
|
|
238
|
-
shortTitle: ( localize2(
|
|
238
|
+
shortTitle: ( localize2(16706, "Sticky Scroll")),
|
|
239
239
|
category: Categories.View,
|
|
240
240
|
toggled: {
|
|
241
241
|
condition: ( ContextKeyExpr.equals("config.notebook.stickyScroll.enabled", true)),
|
|
242
|
-
title: ( localize(
|
|
243
|
-
mnemonicTitle: ( localize(
|
|
242
|
+
title: ( localize(16707, "Sticky Scroll")),
|
|
243
|
+
mnemonicTitle: ( localize(16705, "&&Sticky Scroll"))
|
|
244
244
|
},
|
|
245
245
|
menu: [{
|
|
246
246
|
id: MenuId.CommandPalette
|
package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js
CHANGED
|
@@ -21,7 +21,7 @@ class NotebookIndentUsingTabs extends Action2 {
|
|
|
21
21
|
constructor() {
|
|
22
22
|
super({
|
|
23
23
|
id: NotebookIndentUsingTabs.ID,
|
|
24
|
-
title: ( localize(
|
|
24
|
+
title: ( localize(16708, "Indent Using Tabs")),
|
|
25
25
|
precondition: undefined
|
|
26
26
|
});
|
|
27
27
|
}
|
|
@@ -36,7 +36,7 @@ class NotebookIndentUsingSpaces extends Action2 {
|
|
|
36
36
|
constructor() {
|
|
37
37
|
super({
|
|
38
38
|
id: NotebookIndentUsingSpaces.ID,
|
|
39
|
-
title: ( localize(
|
|
39
|
+
title: ( localize(16709, "Indent Using Spaces")),
|
|
40
40
|
precondition: undefined
|
|
41
41
|
});
|
|
42
42
|
}
|
|
@@ -51,7 +51,7 @@ class NotebookChangeTabDisplaySize extends Action2 {
|
|
|
51
51
|
constructor() {
|
|
52
52
|
super({
|
|
53
53
|
id: NotebookChangeTabDisplaySize.ID,
|
|
54
|
-
title: ( localize(
|
|
54
|
+
title: ( localize(16710, "Change Tab Display Size")),
|
|
55
55
|
precondition: undefined
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -66,7 +66,7 @@ class NotebookIndentationToSpacesAction extends Action2 {
|
|
|
66
66
|
constructor() {
|
|
67
67
|
super({
|
|
68
68
|
id: NotebookIndentationToSpacesAction.ID,
|
|
69
|
-
title: ( localize(
|
|
69
|
+
title: ( localize(16711, "Convert Indentation to Spaces")),
|
|
70
70
|
precondition: undefined
|
|
71
71
|
});
|
|
72
72
|
}
|
|
@@ -81,7 +81,7 @@ class NotebookIndentationToTabsAction extends Action2 {
|
|
|
81
81
|
constructor() {
|
|
82
82
|
super({
|
|
83
83
|
id: NotebookIndentationToTabsAction.ID,
|
|
84
|
-
title: ( localize(
|
|
84
|
+
title: ( localize(16712, "Convert Indentation to Tabs")),
|
|
85
85
|
precondition: undefined
|
|
86
86
|
});
|
|
87
87
|
}
|
|
@@ -103,10 +103,10 @@ function changeNotebookIndentation(accessor, insertSpaces, displaySizeOnly) {
|
|
|
103
103
|
if (!notebookEditor) {
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
const picks =
|
|
106
|
+
const picks = [1, 2, 3, 4, 5, 6, 7, 8].map(n => ({
|
|
107
107
|
id: ( n.toString()),
|
|
108
108
|
label: ( n.toString())
|
|
109
|
-
}))
|
|
109
|
+
}));
|
|
110
110
|
const initialConfig = configurationService.getValue(NotebookSetting.cellEditorOptionsCustomizations);
|
|
111
111
|
const initialInsertSpaces = initialConfig["editor.insertSpaces"];
|
|
112
112
|
delete initialConfig["editor.indentSize"];
|
|
@@ -114,7 +114,7 @@ function changeNotebookIndentation(accessor, insertSpaces, displaySizeOnly) {
|
|
|
114
114
|
delete initialConfig["editor.insertSpaces"];
|
|
115
115
|
setTimeout(() => {
|
|
116
116
|
quickInputService.pick(picks, {
|
|
117
|
-
placeHolder: ( localize(
|
|
117
|
+
placeHolder: ( localize(16713, "Select Tab Size for Current File"))
|
|
118
118
|
}).then(pick => {
|
|
119
119
|
if (pick) {
|
|
120
120
|
const pickedVal = parseInt(pick.label, 10);
|
|
@@ -155,7 +155,7 @@ function convertNotebookIndentation(accessor, tabsToSpaces) {
|
|
|
155
155
|
}
|
|
156
156
|
const disposable = ( new DisposableStore());
|
|
157
157
|
try {
|
|
158
|
-
Promise.all(
|
|
158
|
+
Promise.all(notebookTextModel.cells.map(async cell => {
|
|
159
159
|
const ref = await textModelService.createModelReference(cell.uri);
|
|
160
160
|
disposable.add(ref);
|
|
161
161
|
const textEditorModel = ref.object.textEditorModel;
|
|
@@ -165,10 +165,10 @@ function convertNotebookIndentation(accessor, tabsToSpaces) {
|
|
|
165
165
|
}
|
|
166
166
|
const edits = getIndentationEditOperations(textEditorModel, modelOpts.tabSize, tabsToSpaces);
|
|
167
167
|
bulkEditService.apply(edits, {
|
|
168
|
-
label: ( localize(
|
|
168
|
+
label: ( localize(16714, "Convert Indentation")),
|
|
169
169
|
code: "undoredo.convertIndentation"
|
|
170
170
|
});
|
|
171
|
-
}))
|
|
171
|
+
})).then(() => {
|
|
172
172
|
const initialConfig = configurationService.getValue(NotebookSetting.cellEditorOptionsCustomizations);
|
|
173
173
|
const initialIndentSize = initialConfig["editor.indentSize"];
|
|
174
174
|
const initialTabSize = initialConfig["editor.tabSize"];
|
|
@@ -16,10 +16,10 @@ class NotebookRunSingleCellInSection extends Action2 {
|
|
|
16
16
|
super({
|
|
17
17
|
id: "notebook.section.runSingleCell",
|
|
18
18
|
title: {
|
|
19
|
-
...( localize2(
|
|
20
|
-
mnemonicTitle: ( localize(
|
|
19
|
+
...( localize2(16715, "Run Cell")),
|
|
20
|
+
mnemonicTitle: ( localize(16716, "&&Run Cell"))
|
|
21
21
|
},
|
|
22
|
-
shortTitle: ( localize(
|
|
22
|
+
shortTitle: ( localize(16715, "Run Cell")),
|
|
23
23
|
icon: executeIcon,
|
|
24
24
|
menu: [{
|
|
25
25
|
id: MenuId.NotebookOutlineActionMenu,
|
|
@@ -41,10 +41,10 @@ class NotebookRunCellsInSection extends Action2 {
|
|
|
41
41
|
super({
|
|
42
42
|
id: "notebook.section.runCells",
|
|
43
43
|
title: {
|
|
44
|
-
...( localize2(
|
|
45
|
-
mnemonicTitle: ( localize(
|
|
44
|
+
...( localize2(16717, "Run Cells In Section")),
|
|
45
|
+
mnemonicTitle: ( localize(16718, "&&Run Cells In Section"))
|
|
46
46
|
},
|
|
47
|
-
shortTitle: ( localize(
|
|
47
|
+
shortTitle: ( localize(16717, "Run Cells In Section")),
|
|
48
48
|
icon: executeIcon,
|
|
49
49
|
menu: [{
|
|
50
50
|
id: MenuId.NotebookStickyScrollContext,
|
|
@@ -100,10 +100,10 @@ class NotebookFoldSection extends Action2 {
|
|
|
100
100
|
super({
|
|
101
101
|
id: "notebook.section.foldSection",
|
|
102
102
|
title: {
|
|
103
|
-
...( localize2(
|
|
104
|
-
mnemonicTitle: ( localize(
|
|
103
|
+
...( localize2(16719, "Fold Section")),
|
|
104
|
+
mnemonicTitle: ( localize(16720, "&&Fold Section"))
|
|
105
105
|
},
|
|
106
|
-
shortTitle: ( localize(
|
|
106
|
+
shortTitle: ( localize(16719, "Fold Section")),
|
|
107
107
|
menu: [{
|
|
108
108
|
id: MenuId.NotebookOutlineActionMenu,
|
|
109
109
|
group: "notebookFolding",
|
|
@@ -131,10 +131,10 @@ class NotebookExpandSection extends Action2 {
|
|
|
131
131
|
super({
|
|
132
132
|
id: "notebook.section.expandSection",
|
|
133
133
|
title: {
|
|
134
|
-
...( localize2(
|
|
135
|
-
mnemonicTitle: ( localize(
|
|
134
|
+
...( localize2(16721, "Expand Section")),
|
|
135
|
+
mnemonicTitle: ( localize(16722, "&&Expand Section"))
|
|
136
136
|
},
|
|
137
|
-
shortTitle: ( localize(
|
|
137
|
+
shortTitle: ( localize(16721, "Expand Section")),
|
|
138
138
|
menu: [{
|
|
139
139
|
id: MenuId.NotebookOutlineActionMenu,
|
|
140
140
|
group: "notebookFolding",
|
|
@@ -13,7 +13,7 @@ registerAction2(class OpenVariablesViewAction extends NotebookAction {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super({
|
|
15
15
|
id: OPEN_VARIABLES_VIEW_COMMAND_ID,
|
|
16
|
-
title: ( localize2(
|
|
16
|
+
title: ( localize2(16723, "Variables")),
|
|
17
17
|
icon: variablesViewIcon,
|
|
18
18
|
menu: [{
|
|
19
19
|
id: MenuId.InteractiveToolbar,
|