@codingame/monaco-vscode-notebook-service-override 26.0.1 → 26.1.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/package.json +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +21 -21
- 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 +1 -1
- 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 +6 -6
- 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 +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +4 -4
- 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 +5 -5
- 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 +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 +9 -9
- 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 +12 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +25 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +22 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +7 -7
- 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 +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +59 -59
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +31 -31
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +14 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
|
@@ -71,7 +71,7 @@ let NotebookVariables = class NotebookVariables extends Disposable {
|
|
|
71
71
|
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
72
72
|
const viewDescriptor = {
|
|
73
73
|
id: "workbench.notebook.variables",
|
|
74
|
-
name: ( localize2(
|
|
74
|
+
name: ( localize2(9641, "Notebook Variables")),
|
|
75
75
|
containerIcon: variablesViewIcon,
|
|
76
76
|
ctorDescriptor: ( new SyncDescriptor(NotebookVariablesView)),
|
|
77
77
|
order: 50,
|
|
@@ -79,7 +79,7 @@ class NotebookVariableDataSource {
|
|
|
79
79
|
notebook: parent.notebook,
|
|
80
80
|
id: parent.id + `${last + 1}`,
|
|
81
81
|
extHostId: parent.extHostId,
|
|
82
|
-
name: ( localize(
|
|
82
|
+
name: ( localize(9642, "Display limit reached")),
|
|
83
83
|
value: "",
|
|
84
84
|
indexedChildrenCount: 0,
|
|
85
85
|
hasNamedChildren: false
|
|
@@ -12,8 +12,8 @@ import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
12
12
|
var NotebookVariableRenderer_1;
|
|
13
13
|
const $ = $$1;
|
|
14
14
|
const MAX_VALUE_RENDER_LENGTH_IN_VIEWLET = 1024;
|
|
15
|
-
const NOTEBOOK_TITLE = ( localize2(
|
|
16
|
-
const REPL_TITLE = ( localize2(
|
|
15
|
+
const NOTEBOOK_TITLE = ( localize2(9643, "Notebook Variables"));
|
|
16
|
+
const REPL_TITLE = ( localize2(9644, "REPL Variables"));
|
|
17
17
|
class NotebookVariablesDelegate {
|
|
18
18
|
getHeight(element) {
|
|
19
19
|
return 22;
|
|
@@ -76,7 +76,7 @@ class NotebookVariableAccessibilityProvider {
|
|
|
76
76
|
this._widgetAriaLabel.set(label, undefined);
|
|
77
77
|
}
|
|
78
78
|
getAriaLabel(element) {
|
|
79
|
-
return localize(
|
|
79
|
+
return localize(9645, "Variable {0}, value {1}", element.name, element.value);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -775,33 +775,33 @@ const NotebookOutlineContext = {
|
|
|
775
775
|
type: "boolean",
|
|
776
776
|
default: true,
|
|
777
777
|
markdownDescription: ( localize(
|
|
778
|
-
|
|
778
|
+
9646,
|
|
779
779
|
"When enabled, notebook outline will show only markdown cells containing a header."
|
|
780
780
|
))
|
|
781
781
|
},
|
|
782
782
|
[NotebookSetting.outlineShowCodeCells]: {
|
|
783
783
|
type: "boolean",
|
|
784
784
|
default: false,
|
|
785
|
-
markdownDescription: ( localize(
|
|
785
|
+
markdownDescription: ( localize(9647, "When enabled, notebook outline shows code cells."))
|
|
786
786
|
},
|
|
787
787
|
[NotebookSetting.outlineShowCodeCellSymbols]: {
|
|
788
788
|
type: "boolean",
|
|
789
789
|
default: true,
|
|
790
790
|
markdownDescription: ( localize(
|
|
791
|
-
|
|
791
|
+
9648,
|
|
792
792
|
"When enabled, notebook outline shows code cell symbols. Relies on `#notebook.outline.showCodeCells#` being enabled."
|
|
793
793
|
))
|
|
794
794
|
},
|
|
795
795
|
[NotebookSetting.breadcrumbsShowCodeCells]: {
|
|
796
796
|
type: "boolean",
|
|
797
797
|
default: true,
|
|
798
|
-
markdownDescription: ( localize(
|
|
798
|
+
markdownDescription: ( localize(9649, "When enabled, notebook breadcrumbs contain code cells."))
|
|
799
799
|
},
|
|
800
800
|
[NotebookSetting.gotoSymbolsAllSymbols]: {
|
|
801
801
|
type: "boolean",
|
|
802
802
|
default: true,
|
|
803
803
|
markdownDescription: ( localize(
|
|
804
|
-
|
|
804
|
+
9650,
|
|
805
805
|
"When enabled, the Go to Symbol Quick Pick will display full code symbols from the notebook, as well as Markdown headers."
|
|
806
806
|
))
|
|
807
807
|
}
|
|
@@ -809,7 +809,7 @@ const NotebookOutlineContext = {
|
|
|
809
809
|
});
|
|
810
810
|
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
|
811
811
|
submenu: MenuId.NotebookOutlineFilter,
|
|
812
|
-
title: ( localize(
|
|
812
|
+
title: ( localize(9651, "Filter Entries")),
|
|
813
813
|
icon: Codicon.filter,
|
|
814
814
|
group: "navigation",
|
|
815
815
|
order: -1,
|
|
@@ -819,7 +819,7 @@ registerAction2(class ToggleShowMarkdownHeadersOnly extends Action2 {
|
|
|
819
819
|
constructor() {
|
|
820
820
|
super({
|
|
821
821
|
id: "notebook.outline.toggleShowMarkdownHeadersOnly",
|
|
822
|
-
title: ( localize(
|
|
822
|
+
title: ( localize(9652, "Markdown Headers Only")),
|
|
823
823
|
f1: false,
|
|
824
824
|
toggled: {
|
|
825
825
|
condition: ( ContextKeyExpr.equals("config.notebook.outline.showMarkdownHeadersOnly", true))
|
|
@@ -840,7 +840,7 @@ registerAction2(class ToggleCodeCellEntries extends Action2 {
|
|
|
840
840
|
constructor() {
|
|
841
841
|
super({
|
|
842
842
|
id: "notebook.outline.toggleCodeCells",
|
|
843
|
-
title: ( localize(
|
|
843
|
+
title: ( localize(9653, "Code Cells")),
|
|
844
844
|
f1: false,
|
|
845
845
|
toggled: {
|
|
846
846
|
condition: ( ContextKeyExpr.equals("config.notebook.outline.showCodeCells", true))
|
|
@@ -862,7 +862,7 @@ registerAction2(class ToggleCodeCellSymbolEntries extends Action2 {
|
|
|
862
862
|
constructor() {
|
|
863
863
|
super({
|
|
864
864
|
id: "notebook.outline.toggleCodeCellSymbols",
|
|
865
|
-
title: ( localize(
|
|
865
|
+
title: ( localize(9654, "Code Cell Symbols")),
|
|
866
866
|
f1: false,
|
|
867
867
|
toggled: {
|
|
868
868
|
condition: ( ContextKeyExpr.equals("config.notebook.outline.showCodeCellSymbols", true))
|
|
@@ -73,7 +73,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
73
73
|
return undefined;
|
|
74
74
|
}
|
|
75
75
|
progress.report({
|
|
76
|
-
message: ( localize(
|
|
76
|
+
message: ( localize(9656, "Formatting"))
|
|
77
77
|
});
|
|
78
78
|
const notebook = workingCopy.model.notebookModel;
|
|
79
79
|
const formatApplied = await this.instantiationService.invokeFunction(
|
|
@@ -104,7 +104,7 @@ let FormatOnSaveParticipant = class FormatOnSaveParticipant {
|
|
|
104
104
|
return [];
|
|
105
105
|
})));
|
|
106
106
|
await this.bulkEditService.apply( allCellEdits.flat(), {
|
|
107
|
-
label: ( localize(
|
|
107
|
+
label: ( localize(9657, "Format Notebook")),
|
|
108
108
|
code: "undoredo.formatNotebook"
|
|
109
109
|
});
|
|
110
110
|
}
|
|
@@ -178,7 +178,7 @@ let TrimWhitespaceParticipant = class TrimWhitespaceParticipant extends Notebook
|
|
|
178
178
|
})));
|
|
179
179
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
180
180
|
await this.bulkEditService.apply(filteredEdits, {
|
|
181
|
-
label: ( localize(
|
|
181
|
+
label: ( localize(9658, "Notebook Trim Trailing Whitespace")),
|
|
182
182
|
code: "undoredo.notebookTrimTrailingWhitespace"
|
|
183
183
|
});
|
|
184
184
|
} finally {
|
|
@@ -253,7 +253,7 @@ let TrimFinalNewLinesParticipant = class TrimFinalNewLinesParticipant extends No
|
|
|
253
253
|
})));
|
|
254
254
|
const filteredEdits = allCellEdits.flat().filter(edit => edit !== undefined);
|
|
255
255
|
await this.bulkEditService.apply(filteredEdits, {
|
|
256
|
-
label: ( localize(
|
|
256
|
+
label: ( localize(9659, "Trim Final New Lines")),
|
|
257
257
|
code: "undoredo.trimFinalNewLines"
|
|
258
258
|
});
|
|
259
259
|
} finally {
|
|
@@ -310,7 +310,7 @@ let InsertFinalNewLineParticipant = class InsertFinalNewLineParticipant extends
|
|
|
310
310
|
})));
|
|
311
311
|
const filteredEdits = allCellEdits.filter(edit => edit !== undefined);
|
|
312
312
|
await this.bulkEditService.apply(filteredEdits, {
|
|
313
|
-
label: ( localize(
|
|
313
|
+
label: ( localize(9660, "Insert Final New Line")),
|
|
314
314
|
code: "undoredo.insertFinalNewLine"
|
|
315
315
|
});
|
|
316
316
|
if (activeCellEditor && selections) {
|
|
@@ -366,7 +366,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
366
366
|
if (notebookCodeActionsOnSave.length) {
|
|
367
367
|
const nbDisposable = ( new DisposableStore());
|
|
368
368
|
progress.report({
|
|
369
|
-
message: ( localize(
|
|
369
|
+
message: ( localize(9661, "Running 'Notebook' code actions"))
|
|
370
370
|
});
|
|
371
371
|
try {
|
|
372
372
|
const cell = notebookModel.cells[0];
|
|
@@ -407,7 +407,7 @@ let CodeActionOnSaveParticipant = class CodeActionOnSaveParticipant {
|
|
|
407
407
|
}
|
|
408
408
|
const cellDisposable = ( new DisposableStore());
|
|
409
409
|
progress.report({
|
|
410
|
-
message: ( localize(
|
|
410
|
+
message: ( localize(9662, "Running 'Cell' code actions"))
|
|
411
411
|
});
|
|
412
412
|
try {
|
|
413
413
|
await Promise.all(( notebookModel.cells.map(async cell => {
|
|
@@ -450,7 +450,7 @@ class CodeActionParticipantUtils {
|
|
|
450
450
|
const formatDisposable = ( new DisposableStore());
|
|
451
451
|
let formatResult = false;
|
|
452
452
|
progress.report({
|
|
453
|
-
message: ( localize(
|
|
453
|
+
message: ( localize(9663, "Running 'Format' code actions"))
|
|
454
454
|
});
|
|
455
455
|
try {
|
|
456
456
|
const cell = notebookModel.cells[0];
|
|
@@ -488,7 +488,7 @@ class CodeActionParticipantUtils {
|
|
|
488
488
|
_report() {
|
|
489
489
|
progress.report({
|
|
490
490
|
message: ( localize(
|
|
491
|
-
|
|
491
|
+
9664,
|
|
492
492
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
493
493
|
( [...this._names].map(name => `'${name}'`)).join(", "),
|
|
494
494
|
"command:workbench.action.openSettings?%5B%22notebook.codeActionsOnSave%22%5D"
|
|
@@ -535,7 +535,7 @@ class CodeActionParticipantUtils {
|
|
|
535
535
|
continue;
|
|
536
536
|
}
|
|
537
537
|
progress.report({
|
|
538
|
-
message: ( localize(
|
|
538
|
+
message: ( localize(9665, "Applying code action '{0}'.", action.action.title))
|
|
539
539
|
});
|
|
540
540
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
541
541
|
if (token.isCancellationRequested) {
|
|
@@ -566,7 +566,7 @@ class CodeActionParticipantUtils {
|
|
|
566
566
|
_report() {
|
|
567
567
|
progress.report({
|
|
568
568
|
message: ( localize(
|
|
569
|
-
|
|
569
|
+
9664,
|
|
570
570
|
"Getting code actions from '{0}' ([configure]({1})).",
|
|
571
571
|
( [...this._names].map(name => `'${name}'`)).join(", "),
|
|
572
572
|
"command:workbench.action.openSettings?%5B%22notebook.defaultFormatter%22%5D"
|
|
@@ -603,7 +603,7 @@ class CodeActionParticipantUtils {
|
|
|
603
603
|
return false;
|
|
604
604
|
}
|
|
605
605
|
progress.report({
|
|
606
|
-
message: ( localize(
|
|
606
|
+
message: ( localize(9665, "Applying code action '{0}'.", action.action.title))
|
|
607
607
|
});
|
|
608
608
|
await instantiationService.invokeFunction(applyCodeAction, action, ApplyCodeActionReason.OnSave, {}, token);
|
|
609
609
|
if (token.isCancellationRequested) {
|
|
@@ -282,7 +282,7 @@ registerAction2(class extends Action2 {
|
|
|
282
282
|
constructor() {
|
|
283
283
|
super({
|
|
284
284
|
id: "notebook.toggleLayoutTroubleshoot",
|
|
285
|
-
title: ( localize2(
|
|
285
|
+
title: ( localize2(9666, "Toggle Notebook Layout Troubleshoot")),
|
|
286
286
|
category: Categories.Developer,
|
|
287
287
|
f1: true
|
|
288
288
|
});
|
|
@@ -301,7 +301,7 @@ registerAction2(class extends Action2 {
|
|
|
301
301
|
constructor() {
|
|
302
302
|
super({
|
|
303
303
|
id: "notebook.inspectLayout",
|
|
304
|
-
title: ( localize2(
|
|
304
|
+
title: ( localize2(9667, "Inspect Notebook Layout")),
|
|
305
305
|
category: Categories.Developer,
|
|
306
306
|
f1: true
|
|
307
307
|
});
|
|
@@ -322,7 +322,7 @@ registerAction2(class extends Action2 {
|
|
|
322
322
|
constructor() {
|
|
323
323
|
super({
|
|
324
324
|
id: "notebook.clearNotebookEdtitorTypeCache",
|
|
325
|
-
title: ( localize2(
|
|
325
|
+
title: ( localize2(9668, "Clear Notebook Editor Type Cache")),
|
|
326
326
|
category: Categories.Developer,
|
|
327
327
|
f1: true
|
|
328
328
|
});
|
|
@@ -47,7 +47,7 @@ registerAction2(class EditCellAction extends NotebookCellAction {
|
|
|
47
47
|
constructor() {
|
|
48
48
|
super({
|
|
49
49
|
id: EDIT_CELL_COMMAND_ID,
|
|
50
|
-
title: ( localize(
|
|
50
|
+
title: ( localize(9695, "Edit Cell")),
|
|
51
51
|
keybinding: {
|
|
52
52
|
when: ( ContextKeyExpr.and(
|
|
53
53
|
NOTEBOOK_CELL_LIST_FOCUSED,
|
|
@@ -83,7 +83,7 @@ registerAction2(class QuitEditCellAction extends NotebookCellAction {
|
|
|
83
83
|
constructor() {
|
|
84
84
|
super({
|
|
85
85
|
id: QUIT_EDIT_CELL_COMMAND_ID,
|
|
86
|
-
title: ( localize(
|
|
86
|
+
title: ( localize(9696, "Stop Editing Cell")),
|
|
87
87
|
menu: {
|
|
88
88
|
id: MenuId.NotebookCellTitle,
|
|
89
89
|
when: ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo("markup")), NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CELL_EDITABLE)),
|
|
@@ -122,7 +122,7 @@ registerAction2(class QuitEditAllCellsAction extends NotebookAction {
|
|
|
122
122
|
constructor() {
|
|
123
123
|
super({
|
|
124
124
|
id: QUIT_EDIT_ALL_CELLS_COMMAND_ID,
|
|
125
|
-
title: ( localize(
|
|
125
|
+
title: ( localize(9697, "Stop Editing All Cells"))
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
async runWithContext(accessor, context) {
|
|
@@ -151,7 +151,7 @@ registerAction2(class DeleteCellAction extends NotebookCellAction {
|
|
|
151
151
|
constructor() {
|
|
152
152
|
super({
|
|
153
153
|
id: DELETE_CELL_COMMAND_ID,
|
|
154
|
-
title: ( localize(
|
|
154
|
+
title: ( localize(9698, "Delete Cell")),
|
|
155
155
|
keybinding: {
|
|
156
156
|
primary: KeyCode.Delete,
|
|
157
157
|
mac: {
|
|
@@ -185,13 +185,13 @@ registerAction2(class DeleteCellAction extends NotebookCellAction {
|
|
|
185
185
|
const configService = accessor.get(IConfigurationService);
|
|
186
186
|
if (runState === NotebookCellExecutionState.Executing && configService.getValue(NotebookSetting.confirmDeleteRunningCell)) {
|
|
187
187
|
const dialogService = accessor.get(IDialogService);
|
|
188
|
-
const primaryButton = ( localize(
|
|
188
|
+
const primaryButton = ( localize(9699, "Delete"));
|
|
189
189
|
confirmation = await dialogService.confirm({
|
|
190
190
|
type: "question",
|
|
191
|
-
message: ( localize(
|
|
191
|
+
message: ( localize(9700, "This cell is running, are you sure you want to delete it?")),
|
|
192
192
|
primaryButton: primaryButton,
|
|
193
193
|
checkbox: {
|
|
194
|
-
label: ( localize(
|
|
194
|
+
label: ( localize(9701, "Do not ask me again"))
|
|
195
195
|
}
|
|
196
196
|
});
|
|
197
197
|
} else {
|
|
@@ -212,7 +212,7 @@ registerAction2(class ClearCellOutputsAction extends NotebookCellAction {
|
|
|
212
212
|
constructor() {
|
|
213
213
|
super({
|
|
214
214
|
id: CLEAR_CELL_OUTPUTS_COMMAND_ID,
|
|
215
|
-
title: ( localize(
|
|
215
|
+
title: ( localize(9702, "Clear Cell Outputs")),
|
|
216
216
|
menu: [{
|
|
217
217
|
id: MenuId.NotebookCellTitle,
|
|
218
218
|
when: ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo("code")), executeNotebookCondition, NOTEBOOK_CELL_HAS_OUTPUTS, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, ( NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.toNegated()))),
|
|
@@ -279,7 +279,7 @@ registerAction2(class ClearAllCellOutputsAction extends NotebookAction {
|
|
|
279
279
|
constructor() {
|
|
280
280
|
super({
|
|
281
281
|
id: CLEAR_ALL_CELLS_OUTPUTS_COMMAND_ID,
|
|
282
|
-
title: ( localize(
|
|
282
|
+
title: ( localize(9703, "Clear All Outputs")),
|
|
283
283
|
precondition: NOTEBOOK_HAS_OUTPUTS,
|
|
284
284
|
menu: [{
|
|
285
285
|
id: MenuId.EditorTitle,
|
|
@@ -343,14 +343,14 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
343
343
|
constructor() {
|
|
344
344
|
super({
|
|
345
345
|
id: CHANGE_CELL_LANGUAGE,
|
|
346
|
-
title: ( localize(
|
|
346
|
+
title: ( localize(9704, "Change Cell Language")),
|
|
347
347
|
keybinding: {
|
|
348
348
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
349
349
|
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyK, KeyCode.KeyM),
|
|
350
350
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE))
|
|
351
351
|
},
|
|
352
352
|
metadata: {
|
|
353
|
-
description: ( localize(
|
|
353
|
+
description: ( localize(9704, "Change Cell Language")),
|
|
354
354
|
args: [{
|
|
355
355
|
name: "range",
|
|
356
356
|
description: "The cell range",
|
|
@@ -416,9 +416,9 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
416
416
|
providerLanguages.forEach(languageId => {
|
|
417
417
|
let description;
|
|
418
418
|
if (context.cell.cellKind === CellKind.Markup ? (languageId === "markdown") : (languageId === context.cell.language)) {
|
|
419
|
-
description = ( localize(
|
|
419
|
+
description = ( localize(9705, "({0}) - Current Language", languageId));
|
|
420
420
|
} else {
|
|
421
|
-
description = ( localize(
|
|
421
|
+
description = ( localize(9706, "({0})", languageId));
|
|
422
422
|
}
|
|
423
423
|
const languageName = languageService.getLanguageName(languageId);
|
|
424
424
|
if (!languageName) {
|
|
@@ -444,16 +444,16 @@ registerAction2(class ChangeCellLanguageAction extends NotebookCellAction {
|
|
|
444
444
|
return a.description.localeCompare(b.description);
|
|
445
445
|
});
|
|
446
446
|
const autoDetectMode = {
|
|
447
|
-
label: ( localize(
|
|
447
|
+
label: ( localize(9707, "Auto Detect"))
|
|
448
448
|
};
|
|
449
449
|
const picks = [autoDetectMode, {
|
|
450
450
|
type: "separator",
|
|
451
|
-
label: ( localize(
|
|
451
|
+
label: ( localize(9708, "languages (identifier)"))
|
|
452
452
|
}, ...topItems, {
|
|
453
453
|
type: "separator"
|
|
454
454
|
}, ...mainItems];
|
|
455
455
|
const selection = await quickInputService.pick(picks, {
|
|
456
|
-
placeHolder: ( localize(
|
|
456
|
+
placeHolder: ( localize(9709, "Select Language Mode"))
|
|
457
457
|
});
|
|
458
458
|
const languageId = selection === autoDetectMode ? await languageDetectionService.detectLanguage(context.cell.uri) : selection?.languageId;
|
|
459
459
|
if (languageId) {
|
|
@@ -484,7 +484,7 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
|
|
|
484
484
|
constructor() {
|
|
485
485
|
super({
|
|
486
486
|
id: DETECT_CELL_LANGUAGE,
|
|
487
|
-
title: ( localize2(
|
|
487
|
+
title: ( localize2(9710, "Accept Detected Language for Cell")),
|
|
488
488
|
f1: true,
|
|
489
489
|
precondition: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE)),
|
|
490
490
|
keybinding: {
|
|
@@ -504,7 +504,7 @@ registerAction2(class DetectCellLanguageAction extends NotebookCellAction {
|
|
|
504
504
|
if (detection) {
|
|
505
505
|
setCellToLanguage(detection, context);
|
|
506
506
|
} else {
|
|
507
|
-
notificationService.warn(( localize(
|
|
507
|
+
notificationService.warn(( localize(9711, "Unable to detect cell language")));
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
});
|
|
@@ -539,7 +539,7 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
539
539
|
constructor() {
|
|
540
540
|
super({
|
|
541
541
|
id: SELECT_NOTEBOOK_INDENTATION_ID,
|
|
542
|
-
title: ( localize2(
|
|
542
|
+
title: ( localize2(9712, "Select Indentation")),
|
|
543
543
|
f1: true,
|
|
544
544
|
precondition: ( ContextKeyExpr.and(
|
|
545
545
|
NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
@@ -558,12 +558,12 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
558
558
|
const activeNotebook = getNotebookEditorFromEditorPane(editorService.activeEditorPane);
|
|
559
559
|
if (!activeNotebook || activeNotebook.isDisposed) {
|
|
560
560
|
return quickInputService.pick([{
|
|
561
|
-
label: ( localize(
|
|
561
|
+
label: ( localize(9713, "No notebook editor active at this time"))
|
|
562
562
|
}]);
|
|
563
563
|
}
|
|
564
564
|
if (activeNotebook.isReadOnly) {
|
|
565
565
|
return quickInputService.pick([{
|
|
566
|
-
label: ( localize(
|
|
566
|
+
label: ( localize(9714, "The active notebook editor is read-only."))
|
|
567
567
|
}]);
|
|
568
568
|
}
|
|
569
569
|
const picks = ( [(
|
|
@@ -582,14 +582,14 @@ registerAction2(class SelectNotebookIndentation extends NotebookAction {
|
|
|
582
582
|
}));
|
|
583
583
|
picks.splice(3, 0, {
|
|
584
584
|
type: "separator",
|
|
585
|
-
label: ( localize(
|
|
585
|
+
label: ( localize(9715, "convert file"))
|
|
586
586
|
});
|
|
587
587
|
picks.unshift({
|
|
588
588
|
type: "separator",
|
|
589
|
-
label: ( localize(
|
|
589
|
+
label: ( localize(9716, "change view"))
|
|
590
590
|
});
|
|
591
591
|
const action = await quickInputService.pick(picks, {
|
|
592
|
-
placeHolder: ( localize(
|
|
592
|
+
placeHolder: ( localize(9717, "Select Action")),
|
|
593
593
|
matchOnDetail: true
|
|
594
594
|
});
|
|
595
595
|
if (!action) {
|
|
@@ -604,7 +604,7 @@ registerAction2(class CommentSelectedCellsAction extends NotebookMultiCellAction
|
|
|
604
604
|
constructor() {
|
|
605
605
|
super({
|
|
606
606
|
id: COMMENT_SELECTED_CELLS_ID,
|
|
607
|
-
title: ( localize(
|
|
607
|
+
title: ( localize(9718, "Comment Selected Cells")),
|
|
608
608
|
keybinding: {
|
|
609
609
|
when: ( ContextKeyExpr.and(
|
|
610
610
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
@@ -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(9719, "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(9720, "Run All")),
|
|
163
163
|
icon: executeAllIcon,
|
|
164
164
|
metadata: {
|
|
165
|
-
description: ( localize(
|
|
165
|
+
description: ( localize(9720, "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(9721, "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(9721, "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(9722, "Execute Above Cells")),
|
|
249
249
|
menu: [{
|
|
250
250
|
id: MenuId.NotebookCellExecute,
|
|
251
251
|
when: ( ContextKeyExpr.and(executeCondition, ( ContextKeyExpr.equals(`config.${NotebookSetting.consolidatedRunButton}`, true))))
|
|
@@ -286,7 +286,7 @@ registerAction2(class ExecuteCellAndBelow extends NotebookMultiCellAction {
|
|
|
286
286
|
super({
|
|
287
287
|
id: EXECUTE_CELL_AND_BELOW,
|
|
288
288
|
precondition: executeCondition,
|
|
289
|
-
title: ( localize(
|
|
289
|
+
title: ( localize(9723, "Execute Cell and Below")),
|
|
290
290
|
menu: [{
|
|
291
291
|
id: MenuId.NotebookCellExecute,
|
|
292
292
|
when: ( ContextKeyExpr.and(executeCondition, ( ContextKeyExpr.equals(`config.${NotebookSetting.consolidatedRunButton}`, true))))
|
|
@@ -327,9 +327,9 @@ registerAction2(class ExecuteCellFocusContainer extends NotebookMultiCellAction
|
|
|
327
327
|
super({
|
|
328
328
|
id: EXECUTE_CELL_FOCUS_CONTAINER_COMMAND_ID,
|
|
329
329
|
precondition: executeThisCellCondition,
|
|
330
|
-
title: ( localize(
|
|
330
|
+
title: ( localize(9724, "Execute Cell and Focus Container")),
|
|
331
331
|
metadata: {
|
|
332
|
-
description: ( localize(
|
|
332
|
+
description: ( localize(9724, "Execute Cell and Focus Container")),
|
|
333
333
|
args: cellExecutionArgs
|
|
334
334
|
},
|
|
335
335
|
icon: executeIcon
|
|
@@ -362,7 +362,7 @@ registerAction2(class CancelExecuteCell extends NotebookMultiCellAction {
|
|
|
362
362
|
super({
|
|
363
363
|
id: CANCEL_CELL_COMMAND_ID,
|
|
364
364
|
precondition: cellCancelCondition,
|
|
365
|
-
title: ( localize(
|
|
365
|
+
title: ( localize(9725, "Stop Cell Execution")),
|
|
366
366
|
icon: stopIcon,
|
|
367
367
|
menu: {
|
|
368
368
|
id: MenuId.NotebookCellExecutePrimary,
|
|
@@ -370,7 +370,7 @@ registerAction2(class CancelExecuteCell extends NotebookMultiCellAction {
|
|
|
370
370
|
group: "inline"
|
|
371
371
|
},
|
|
372
372
|
metadata: {
|
|
373
|
-
description: ( localize(
|
|
373
|
+
description: ( localize(9725, "Stop Cell Execution")),
|
|
374
374
|
args: [{
|
|
375
375
|
name: "options",
|
|
376
376
|
description: "The cell range options",
|
|
@@ -422,7 +422,7 @@ registerAction2(class ExecuteCellSelectBelow extends NotebookCellAction {
|
|
|
422
422
|
super({
|
|
423
423
|
id: EXECUTE_CELL_SELECT_BELOW,
|
|
424
424
|
precondition: ( ContextKeyExpr.or(executeThisCellCondition, ( NOTEBOOK_CELL_TYPE.isEqualTo("markup")))),
|
|
425
|
-
title: ( localize(
|
|
425
|
+
title: ( localize(9726, "Execute Notebook Cell and Select Below")),
|
|
426
426
|
keybinding: {
|
|
427
427
|
when: ( ContextKeyExpr.and(NOTEBOOK_CELL_LIST_FOCUSED, ( CTX_INLINE_CHAT_FOCUSED.negate()))),
|
|
428
428
|
primary: KeyMod.Shift | KeyCode.Enter,
|
|
@@ -481,7 +481,7 @@ registerAction2(class ExecuteCellInsertBelow extends NotebookCellAction {
|
|
|
481
481
|
super({
|
|
482
482
|
id: EXECUTE_CELL_INSERT_BELOW,
|
|
483
483
|
precondition: ( ContextKeyExpr.or(executeThisCellCondition, ( NOTEBOOK_CELL_TYPE.isEqualTo("markup")))),
|
|
484
|
-
title: ( localize(
|
|
484
|
+
title: ( localize(9727, "Execute Notebook Cell and Insert Below")),
|
|
485
485
|
keybinding: {
|
|
486
486
|
when: NOTEBOOK_CELL_LIST_FOCUSED,
|
|
487
487
|
primary: KeyMod.Alt | KeyCode.Enter,
|
|
@@ -524,7 +524,7 @@ registerAction2(class CancelAllNotebook extends CancelNotebook {
|
|
|
524
524
|
constructor() {
|
|
525
525
|
super({
|
|
526
526
|
id: CANCEL_NOTEBOOK_COMMAND_ID,
|
|
527
|
-
title: ( localize2(
|
|
527
|
+
title: ( localize2(9728, "Stop Execution")),
|
|
528
528
|
icon: stopIcon,
|
|
529
529
|
menu: [{
|
|
530
530
|
id: MenuId.EditorTitle,
|
|
@@ -544,7 +544,7 @@ registerAction2(class InterruptNotebook extends CancelNotebook {
|
|
|
544
544
|
constructor() {
|
|
545
545
|
super({
|
|
546
546
|
id: INTERRUPT_NOTEBOOK_COMMAND_ID,
|
|
547
|
-
title: ( localize2(
|
|
547
|
+
title: ( localize2(9729, "Interrupt")),
|
|
548
548
|
precondition: ( ContextKeyExpr.and(NOTEBOOK_HAS_SOMETHING_RUNNING, NOTEBOOK_INTERRUPTIBLE_KERNEL)),
|
|
549
549
|
icon: stopIcon,
|
|
550
550
|
menu: [{
|
|
@@ -574,7 +574,7 @@ registerAction2(class InterruptNotebook extends CancelNotebook {
|
|
|
574
574
|
}
|
|
575
575
|
});
|
|
576
576
|
MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
577
|
-
title: ( localize(
|
|
577
|
+
title: ( localize(9730, "Go To")),
|
|
578
578
|
submenu: MenuId.NotebookCellExecuteGoTo,
|
|
579
579
|
group: "navigation/execute",
|
|
580
580
|
order: 20,
|
|
@@ -584,9 +584,9 @@ registerAction2(class RevealRunningCellAction extends NotebookAction {
|
|
|
584
584
|
constructor() {
|
|
585
585
|
super({
|
|
586
586
|
id: REVEAL_RUNNING_CELL,
|
|
587
|
-
title: ( localize(
|
|
588
|
-
tooltip: ( localize(
|
|
589
|
-
shortTitle: ( localize(
|
|
587
|
+
title: ( localize(9731, "Go to Running Cell")),
|
|
588
|
+
tooltip: ( localize(9731, "Go to Running Cell")),
|
|
589
|
+
shortTitle: ( localize(9731, "Go to Running Cell")),
|
|
590
590
|
precondition: NOTEBOOK_HAS_RUNNING_CELL,
|
|
591
591
|
menu: [{
|
|
592
592
|
id: MenuId.EditorTitle,
|
|
@@ -640,9 +640,9 @@ registerAction2(class RevealLastFailedCellAction extends NotebookAction {
|
|
|
640
640
|
constructor() {
|
|
641
641
|
super({
|
|
642
642
|
id: REVEAL_LAST_FAILED_CELL,
|
|
643
|
-
title: ( localize(
|
|
644
|
-
tooltip: ( localize(
|
|
645
|
-
shortTitle: ( localize(
|
|
643
|
+
title: ( localize(9732, "Go to Most Recently Failed Cell")),
|
|
644
|
+
tooltip: ( localize(9732, "Go to Most Recently Failed Cell")),
|
|
645
|
+
shortTitle: ( localize(9733, "Go to Most Recently Failed Cell")),
|
|
646
646
|
precondition: NOTEBOOK_LAST_CELL_FAILED,
|
|
647
647
|
menu: [{
|
|
648
648
|
id: MenuId.EditorTitle,
|