@codingame/monaco-vscode-notebook-service-override 37.2.0 → 37.3.1
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 +2 -2
- package/package.json +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +6 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +8 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- 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 +26 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +6 -6
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +21 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +10 -10
- 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 +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +36 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +14 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +7 -7
- 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 +2 -2
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +16 -16
- 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 +29 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +11 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +40 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +33 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +22 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +15 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +25 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +8 -8
- 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 +73 -73
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +35 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
- 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.d.ts +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/OutlineEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +28 -28
- 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 +7 -7
- 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
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js
CHANGED
|
@@ -33,12 +33,12 @@ import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
33
33
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
34
34
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
35
35
|
import { NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_EDITOR_FOCUSED, KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
36
|
-
import { NotebookAction } from '@codingame/monaco-vscode-
|
|
36
|
+
import { NotebookAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
37
37
|
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
38
|
-
import { registerNotebookContribution } from '@codingame/monaco-vscode-
|
|
39
|
-
import { CellEditorOptions } from '@codingame/monaco-vscode-
|
|
40
|
-
import { NotebookFindContrib } from '@codingame/monaco-vscode-
|
|
41
|
-
import { NotebookCellTextModel } from '@codingame/monaco-vscode-
|
|
38
|
+
import { registerNotebookContribution } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
39
|
+
import { CellEditorOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions';
|
|
40
|
+
import { NotebookFindContrib } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget';
|
|
41
|
+
import { NotebookCellTextModel } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
|
|
42
42
|
|
|
43
43
|
const NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID = "notebook.addFindMatchToSelection";
|
|
44
44
|
const NOTEBOOK_SELECT_ALL_FIND_MATCHES_ID = "notebook.selectAllFindMatches";
|
|
@@ -49,8 +49,8 @@ var NotebookMultiCursorState;
|
|
|
49
49
|
NotebookMultiCursorState[NotebookMultiCursorState["Editing"] = 2] = "Editing";
|
|
50
50
|
})(NotebookMultiCursorState || (NotebookMultiCursorState = {}));
|
|
51
51
|
const NOTEBOOK_MULTI_CURSOR_CONTEXT = {
|
|
52
|
-
IsNotebookMultiCursor:
|
|
53
|
-
NotebookMultiSelectCursorState:
|
|
52
|
+
IsNotebookMultiCursor: new RawContextKey("isNotebookMultiSelect", false),
|
|
53
|
+
NotebookMultiSelectCursorState: new RawContextKey("notebookMultiSelectCursorState", NotebookMultiCursorState.Idle)
|
|
54
54
|
};
|
|
55
55
|
let NotebookMultiCursorController = class NotebookMultiCursorController extends Disposable {
|
|
56
56
|
static {
|
|
@@ -152,13 +152,13 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
152
152
|
if (!controller) {
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
|
-
const newSelections =
|
|
155
|
+
const newSelections = controller.getSelections().map(selection => {
|
|
156
156
|
const newStartCol = selection.startColumn + translation.deltaStartCol;
|
|
157
157
|
const newStartLine = selection.startLineNumber + translation.deltaStartLine;
|
|
158
158
|
const newEndCol = selection.endColumn + translation.deltaEndCol;
|
|
159
159
|
const newEndLine = selection.endLineNumber + translation.deltaEndLine;
|
|
160
160
|
return Selection.createWithDirection(newStartLine, newStartCol, newEndLine, newEndCol, translationDir);
|
|
161
|
-
})
|
|
161
|
+
});
|
|
162
162
|
controller.setSelections(( new ViewModelEventsCollector()), e.source, newSelections, CursorChangeReason.Explicit);
|
|
163
163
|
});
|
|
164
164
|
this.updateLazyDecorations();
|
|
@@ -174,7 +174,7 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
174
174
|
}
|
|
175
175
|
async syncCursorsControllers() {
|
|
176
176
|
this.cursorsDisposables.clear();
|
|
177
|
-
await Promise.all(
|
|
177
|
+
await Promise.all(this.trackedCells.map(async cell => {
|
|
178
178
|
const controller = await this.createCursorController(cell);
|
|
179
179
|
if (!controller) {
|
|
180
180
|
return;
|
|
@@ -182,7 +182,7 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
182
182
|
this.cursorsControllers.set(cell.cellViewModel.uri, controller);
|
|
183
183
|
const selections = cell.matchSelections;
|
|
184
184
|
controller.setSelections(( new ViewModelEventsCollector()), undefined, selections, CursorChangeReason.Explicit);
|
|
185
|
-
}))
|
|
185
|
+
}));
|
|
186
186
|
this.updateLazyDecorations();
|
|
187
187
|
}
|
|
188
188
|
async createCursorController(cell) {
|
|
@@ -517,9 +517,14 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
517
517
|
this.anchorCell = this.notebookEditor.activeCellAndCodeEditor;
|
|
518
518
|
this.trackedCells = [];
|
|
519
519
|
for (const match of matches) {
|
|
520
|
-
this.updateTrackedCell(
|
|
520
|
+
this.updateTrackedCell(
|
|
521
|
+
match.cell,
|
|
522
|
+
match.contentMatches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))
|
|
523
|
+
);
|
|
521
524
|
if (this.anchorCell && match.cell.handle === this.anchorCell[0].handle) {
|
|
522
|
-
match.cell.setSelections(
|
|
525
|
+
match.cell.setSelections(
|
|
526
|
+
match.contentMatches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))
|
|
527
|
+
);
|
|
523
528
|
}
|
|
524
529
|
}
|
|
525
530
|
this._nbIsMultiSelectSession.set(true);
|
|
@@ -556,11 +561,16 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
556
561
|
const findResults = notebookTextModel.findMatches(this.word, false, true, USUAL_WORD_SEPARATORS);
|
|
557
562
|
this.trackedCells = [];
|
|
558
563
|
for (const res of findResults) {
|
|
559
|
-
await this.updateTrackedCell(
|
|
564
|
+
await this.updateTrackedCell(
|
|
565
|
+
res.cell,
|
|
566
|
+
res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))
|
|
567
|
+
);
|
|
560
568
|
if (res.cell.handle === focusedCell.handle) {
|
|
561
569
|
const cellViewModel = this.notebookEditor.getCellByHandle(res.cell.handle);
|
|
562
570
|
if (cellViewModel) {
|
|
563
|
-
cellViewModel.setSelections(
|
|
571
|
+
cellViewModel.setSelections(
|
|
572
|
+
res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))
|
|
573
|
+
);
|
|
564
574
|
}
|
|
565
575
|
}
|
|
566
576
|
}
|
|
@@ -570,7 +580,10 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
570
580
|
} else if (this.state === NotebookMultiCursorState.Selecting) {
|
|
571
581
|
const findResults = notebookTextModel.findMatches(this.word, false, true, USUAL_WORD_SEPARATORS);
|
|
572
582
|
for (const res of findResults) {
|
|
573
|
-
await this.updateTrackedCell(
|
|
583
|
+
await this.updateTrackedCell(
|
|
584
|
+
res.cell,
|
|
585
|
+
res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))
|
|
586
|
+
);
|
|
574
587
|
}
|
|
575
588
|
}
|
|
576
589
|
}
|
|
@@ -660,7 +673,7 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
660
673
|
models.push(model);
|
|
661
674
|
}
|
|
662
675
|
}
|
|
663
|
-
await Promise.all(
|
|
676
|
+
await Promise.all(models.map(model => model.undo()));
|
|
664
677
|
this.updateViewModelSelections();
|
|
665
678
|
this.updateLazyDecorations();
|
|
666
679
|
}
|
|
@@ -672,7 +685,7 @@ let NotebookMultiCursorController = class NotebookMultiCursorController extends
|
|
|
672
685
|
models.push(model);
|
|
673
686
|
}
|
|
674
687
|
}
|
|
675
|
-
await Promise.all(
|
|
688
|
+
await Promise.all(models.map(model => model.redo()));
|
|
676
689
|
this.updateViewModelSelections();
|
|
677
690
|
this.updateLazyDecorations();
|
|
678
691
|
}
|
|
@@ -820,7 +833,7 @@ class NotebookSelectAllFindMatches extends NotebookAction {
|
|
|
820
833
|
constructor() {
|
|
821
834
|
super({
|
|
822
835
|
id: NOTEBOOK_SELECT_ALL_FIND_MATCHES_ID,
|
|
823
|
-
title: ( localize(
|
|
836
|
+
title: ( localize(16557, "Select All Occurrences of Find Match")),
|
|
824
837
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)))),
|
|
825
838
|
keybinding: {
|
|
826
839
|
when: ( ContextKeyExpr.or(( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_EDITOR_FOCUSED)), ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED)))),
|
|
@@ -852,7 +865,7 @@ class NotebookAddMatchToMultiSelectionAction extends NotebookAction {
|
|
|
852
865
|
constructor() {
|
|
853
866
|
super({
|
|
854
867
|
id: NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID,
|
|
855
|
-
title: ( localize(
|
|
868
|
+
title: ( localize(16558, "Add Selection to Next Find Match")),
|
|
856
869
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_EDITOR_FOCUSED)),
|
|
857
870
|
keybinding: {
|
|
858
871
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_EDITOR_FOCUSED)),
|
|
@@ -878,7 +891,7 @@ class NotebookExitMultiSelectionAction extends NotebookAction {
|
|
|
878
891
|
constructor() {
|
|
879
892
|
super({
|
|
880
893
|
id: "noteMultiCursor.exit",
|
|
881
|
-
title: ( localize(
|
|
894
|
+
title: ( localize(16559, "Exit Multi Cursor Mode")),
|
|
882
895
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor)),
|
|
883
896
|
keybinding: {
|
|
884
897
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor)),
|
|
@@ -901,7 +914,7 @@ class NotebookDeleteLeftMultiSelectionAction extends NotebookAction {
|
|
|
901
914
|
constructor() {
|
|
902
915
|
super({
|
|
903
916
|
id: "noteMultiCursor.deleteLeft",
|
|
904
|
-
title: ( localize(
|
|
917
|
+
title: ( localize(16560, "Delete Left")),
|
|
905
918
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ( ContextKeyExpr.or(( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting)), ( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing)))))),
|
|
906
919
|
keybinding: {
|
|
907
920
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ( ContextKeyExpr.or(( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting)), ( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing)))))),
|
|
@@ -924,7 +937,7 @@ class NotebookDeleteRightMultiSelectionAction extends NotebookAction {
|
|
|
924
937
|
constructor() {
|
|
925
938
|
super({
|
|
926
939
|
id: "noteMultiCursor.deleteRight",
|
|
927
|
-
title: ( localize(
|
|
940
|
+
title: ( localize(16561, "Delete Right")),
|
|
928
941
|
precondition: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ( ContextKeyExpr.or(( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting)), ( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing)))))),
|
|
929
942
|
keybinding: {
|
|
930
943
|
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals("config.notebook.multiCursor.enabled", true)), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ( ContextKeyExpr.or(( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting)), ( NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing)))))),
|
|
@@ -5,7 +5,7 @@ import { Disposable, DisposableStore } from '@codingame/monaco-vscode-api/vscode
|
|
|
5
5
|
import { Selection, SelectionDirection } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection';
|
|
6
6
|
import { CursorChangeReason } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/cursorEvents';
|
|
7
7
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
|
-
import { registerNotebookContribution } from '@codingame/monaco-vscode-
|
|
8
|
+
import { registerNotebookContribution } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
9
9
|
|
|
10
10
|
let NotebookSelectionHighlighter = class NotebookSelectionHighlighter extends Disposable {
|
|
11
11
|
static {
|
|
@@ -85,9 +85,9 @@ let NotebookSelectionHighlighter = class NotebookSelectionHighlighter extends Di
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
updateCellDecorations(cell, matches) {
|
|
88
|
-
const selections =
|
|
88
|
+
const selections = matches.map(m => {
|
|
89
89
|
return Selection.fromRange(m.range, SelectionDirection.LTR);
|
|
90
|
-
})
|
|
90
|
+
});
|
|
91
91
|
const newDecorations = [];
|
|
92
92
|
selections?.map(selection => {
|
|
93
93
|
const isEmpty = selection.isEmpty();
|
|
@@ -12,7 +12,7 @@ import { InputFocusedContextKey, IsWindowsContext } from '@codingame/monaco-vsco
|
|
|
12
12
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
13
13
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
14
14
|
import { InlineChatController } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
15
|
-
import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from '@codingame/monaco-vscode-
|
|
15
|
+
import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
16
16
|
import { CellEditState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
17
17
|
import { NOTEBOOK_EDITOR_CURSOR_BOUNDARY, NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY, CellKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
18
18
|
import { NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_OR_COMPOSITE_IS_ACTIVE_EDITOR, IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_HAS_OUTPUTS } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
@@ -33,7 +33,7 @@ registerAction2(class extends Action2 {
|
|
|
33
33
|
super({
|
|
34
34
|
id: "notebook.cell.nullAction",
|
|
35
35
|
title: ( localize(
|
|
36
|
-
|
|
36
|
+
16562,
|
|
37
37
|
"Keypresses that should be handled by the focused element in the cell output."
|
|
38
38
|
)),
|
|
39
39
|
keybinding: [{
|
|
@@ -56,7 +56,7 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
56
56
|
constructor() {
|
|
57
57
|
super({
|
|
58
58
|
id: NOTEBOOK_FOCUS_NEXT_EDITOR,
|
|
59
|
-
title: ( localize(
|
|
59
|
+
title: ( localize(16563, "Focus Next Cell Editor")),
|
|
60
60
|
keybinding: [{
|
|
61
61
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells", true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("top")), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("none")), ( ContextKeyExpr.or(( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo("end")), ( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo("both")))))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
62
62
|
primary: KeyCode.DownArrow,
|
|
@@ -110,7 +110,7 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
110
110
|
constructor() {
|
|
111
111
|
super({
|
|
112
112
|
id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR,
|
|
113
|
-
title: ( localize(
|
|
113
|
+
title: ( localize(16564, "Focus Previous Cell Editor")),
|
|
114
114
|
keybinding: [{
|
|
115
115
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells", true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("bottom")), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("none")), ( ContextKeyExpr.or(( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo("start")), ( NOTEBOOK_EDITOR_CURSOR_LINE_BOUNDARY.isEqualTo("both")))))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
116
116
|
primary: KeyCode.UpArrow,
|
|
@@ -155,7 +155,7 @@ registerAction2(class extends NotebookAction {
|
|
|
155
155
|
constructor() {
|
|
156
156
|
super({
|
|
157
157
|
id: NOTEBOOK_FOCUS_TOP,
|
|
158
|
-
title: ( localize(
|
|
158
|
+
title: ( localize(16565, "Focus First Cell")),
|
|
159
159
|
keybinding: [{
|
|
160
160
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
161
161
|
primary: KeyMod.CtrlCmd | KeyCode.Home,
|
|
@@ -182,7 +182,7 @@ registerAction2(class extends NotebookAction {
|
|
|
182
182
|
constructor() {
|
|
183
183
|
super({
|
|
184
184
|
id: NOTEBOOK_FOCUS_BOTTOM,
|
|
185
|
-
title: ( localize(
|
|
185
|
+
title: ( localize(16566, "Focus Last Cell")),
|
|
186
186
|
keybinding: [{
|
|
187
187
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
188
188
|
primary: KeyMod.CtrlCmd | KeyCode.End,
|
|
@@ -214,7 +214,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
214
214
|
constructor() {
|
|
215
215
|
super({
|
|
216
216
|
id: FOCUS_IN_OUTPUT_COMMAND_ID,
|
|
217
|
-
title: ( localize2(
|
|
217
|
+
title: ( localize2(16567, "Focus In Active Cell Output")),
|
|
218
218
|
f1: true,
|
|
219
219
|
keybinding: [{
|
|
220
220
|
when: ( ContextKeyExpr.and(( IS_COMPOSITE_NOTEBOOK.negate()), IsWindowsContext, NOTEBOOK_CELL_HAS_OUTPUTS)),
|
|
@@ -240,7 +240,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
240
240
|
constructor() {
|
|
241
241
|
super({
|
|
242
242
|
id: FOCUS_OUT_OUTPUT_COMMAND_ID,
|
|
243
|
-
title: ( localize(
|
|
243
|
+
title: ( localize(16568, "Focus Out Active Cell Output")),
|
|
244
244
|
keybinding: {
|
|
245
245
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.UpArrow,
|
|
246
246
|
mac: {
|
|
@@ -261,7 +261,7 @@ registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|
|
261
261
|
constructor() {
|
|
262
262
|
super({
|
|
263
263
|
id: CENTER_ACTIVE_CELL,
|
|
264
|
-
title: ( localize(
|
|
264
|
+
title: ( localize(16569, "Center Active Cell")),
|
|
265
265
|
keybinding: {
|
|
266
266
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
267
267
|
primary: KeyMod.CtrlCmd | KeyCode.KeyL,
|
|
@@ -280,7 +280,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
280
280
|
constructor() {
|
|
281
281
|
super({
|
|
282
282
|
id: NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID,
|
|
283
|
-
title: ( localize(
|
|
283
|
+
title: ( localize(16570, "Cell Cursor Page Up")),
|
|
284
284
|
keybinding: [{
|
|
285
285
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
286
286
|
primary: KeyCode.PageUp,
|
|
@@ -298,7 +298,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
298
298
|
constructor() {
|
|
299
299
|
super({
|
|
300
300
|
id: NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID,
|
|
301
|
-
title: ( localize(
|
|
301
|
+
title: ( localize(16571, "Cell Cursor Page Up Select")),
|
|
302
302
|
keybinding: [{
|
|
303
303
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
304
304
|
primary: KeyMod.Shift | KeyCode.PageUp,
|
|
@@ -316,7 +316,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
316
316
|
constructor() {
|
|
317
317
|
super({
|
|
318
318
|
id: NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID,
|
|
319
|
-
title: ( localize(
|
|
319
|
+
title: ( localize(16572, "Cell Cursor Page Down")),
|
|
320
320
|
keybinding: [{
|
|
321
321
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
322
322
|
primary: KeyCode.PageDown,
|
|
@@ -334,7 +334,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
334
334
|
constructor() {
|
|
335
335
|
super({
|
|
336
336
|
id: NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID,
|
|
337
|
-
title: ( localize(
|
|
337
|
+
title: ( localize(16573, "Cell Cursor Page Down Select")),
|
|
338
338
|
keybinding: [{
|
|
339
339
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_OUTPUT_FOCUSED.negate()))),
|
|
340
340
|
primary: KeyMod.Shift | KeyCode.PageDown,
|
|
@@ -363,7 +363,7 @@ function getPageSize(context) {
|
|
|
363
363
|
type: "boolean",
|
|
364
364
|
default: true,
|
|
365
365
|
markdownDescription: ( localize(
|
|
366
|
-
|
|
366
|
+
16574,
|
|
367
367
|
"When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line."
|
|
368
368
|
))
|
|
369
369
|
}
|
|
@@ -18,11 +18,11 @@ import { createInlineValueDecoration } from '@codingame/monaco-vscode-api/vscode
|
|
|
18
18
|
import { State } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug';
|
|
19
19
|
import { IDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
20
20
|
import { NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
21
|
-
import { NotebookExecutionType } from '@codingame/monaco-vscode-
|
|
21
|
+
import { NotebookExecutionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
22
22
|
import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
23
23
|
import { INotebookKernelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
24
|
-
import { NotebookAction } from '@codingame/monaco-vscode-
|
|
25
|
-
import { registerNotebookContribution } from '@codingame/monaco-vscode-
|
|
24
|
+
import { NotebookAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
25
|
+
import { registerNotebookContribution } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
26
26
|
|
|
27
27
|
var NotebookInlineVariablesController_1;
|
|
28
28
|
class InlineSegment {
|
|
@@ -186,7 +186,7 @@ let NotebookInlineVariablesController = class NotebookInlineVariablesController
|
|
|
186
186
|
lineDecorations.forEach((segments, line) => {
|
|
187
187
|
if (segments.length > 0) {
|
|
188
188
|
segments.sort((a, b) => a.column - b.column);
|
|
189
|
-
const text =
|
|
189
|
+
const text = segments.map(s => s.text).join(", ");
|
|
190
190
|
const editorWidth = cell.layoutInfo.editorWidth;
|
|
191
191
|
const fontInfo = cell.layoutInfo.fontInfo;
|
|
192
192
|
if (fontInfo && cell.textModel) {
|
|
@@ -212,7 +212,7 @@ let NotebookInlineVariablesController = class NotebookInlineVariablesController
|
|
|
212
212
|
for await (const v of variables) {
|
|
213
213
|
vars.push(v);
|
|
214
214
|
}
|
|
215
|
-
const varNames =
|
|
215
|
+
const varNames = vars.map(v => v.name);
|
|
216
216
|
const document = cell.textModel;
|
|
217
217
|
if (!document) {
|
|
218
218
|
return;
|
|
@@ -268,7 +268,7 @@ let NotebookInlineVariablesController = class NotebookInlineVariablesController
|
|
|
268
268
|
lineDecorations.forEach((segments, line) => {
|
|
269
269
|
if (segments.length > 0) {
|
|
270
270
|
segments.sort((a, b) => a.column - b.column);
|
|
271
|
-
const text =
|
|
271
|
+
const text = segments.map(s => s.text).join(", ");
|
|
272
272
|
const editorWidth = cell.layoutInfo.editorWidth;
|
|
273
273
|
const fontInfo = cell.layoutInfo.fontInfo;
|
|
274
274
|
if (fontInfo && cell.textModel) {
|
|
@@ -511,7 +511,7 @@ registerAction2(class ClearNotebookInlineValues extends NotebookAction {
|
|
|
511
511
|
constructor() {
|
|
512
512
|
super({
|
|
513
513
|
id: "notebook.clearAllInlineValues",
|
|
514
|
-
title: ( localize(
|
|
514
|
+
title: ( localize(16575, "Clear All Inline Values"))
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
runWithContext(accessor, context) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
3
|
|
|
4
|
-
const NOTEBOOK_VARIABLE_VIEW_ENABLED =
|
|
4
|
+
const NOTEBOOK_VARIABLE_VIEW_ENABLED = new RawContextKey('notebookVariableViewEnabled', false);
|
|
5
5
|
|
|
6
6
|
export { NOTEBOOK_VARIABLE_VIEW_ENABLED };
|
|
@@ -12,7 +12,7 @@ import { VIEWLET_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/con
|
|
|
12
12
|
import { NOTEBOOK_VARIABLE_VIEW_ENABLED } from './notebookVariableContextKeys.js';
|
|
13
13
|
import { NotebookVariablesView } from './notebookVariablesView.js';
|
|
14
14
|
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
15
|
-
import { variablesViewIcon } from '@codingame/monaco-vscode-
|
|
15
|
+
import { variablesViewIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
16
16
|
import { NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
17
17
|
import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
18
18
|
import { INotebookKernelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
@@ -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(16578, "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(16579, "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(16580, "Notebook Variables"));
|
|
16
|
+
const REPL_TITLE = ( localize2(16581, "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(16582, "Variable {0}, value {1}", element.name, element.value);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
8
8
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
9
9
|
import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
10
10
|
import { CellFoldingState, INotebookEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
11
|
-
import { NotebookEditor } from "@codingame/monaco-vscode-
|
|
11
|
+
import { NotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditor";
|
|
12
12
|
import { INotebookCellOutlineDataSource } from "../../viewModel/notebookOutlineDataSource.js";
|
|
13
13
|
import { CellKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
14
14
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
@@ -28,7 +28,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/sear
|
|
|
28
28
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
29
29
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
30
30
|
import { CellFoldingState, CellRevealType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
31
|
-
import { NotebookEditor } from '@codingame/monaco-vscode-
|
|
31
|
+
import { NotebookEditor } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditor';
|
|
32
32
|
import { CellKind, NotebookSetting, NotebookCellsChangeType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
33
33
|
import { SIDE_GROUP } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService';
|
|
34
34
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -49,7 +49,7 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
|
|
|
49
49
|
import { NOTEBOOK_IS_ACTIVE_EDITOR } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
50
50
|
import { NotebookOutlineConstants } from '../../viewModel/notebookOutlineEntryFactory.js';
|
|
51
51
|
import { INotebookCellOutlineDataSourceFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service';
|
|
52
|
-
import { NotebookExecutionType } from '@codingame/monaco-vscode-
|
|
52
|
+
import { NotebookExecutionType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
53
53
|
import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
54
54
|
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
55
55
|
import { safeIntl } from '@codingame/monaco-vscode-api/vscode/vs/base/common/date';
|
|
@@ -759,11 +759,11 @@ let NotebookOutlineCreator = class NotebookOutlineCreator {
|
|
|
759
759
|
};
|
|
760
760
|
NotebookOutlineCreator = ( __decorate([( __param(0, IOutlineService)), ( __param(1, IInstantiationService))], NotebookOutlineCreator));
|
|
761
761
|
const NotebookOutlineContext = {
|
|
762
|
-
CellKind:
|
|
763
|
-
CellHasChildren:
|
|
764
|
-
CellHasHeader:
|
|
765
|
-
CellFoldingState:
|
|
766
|
-
OutlineElementTarget:
|
|
762
|
+
CellKind: new RawContextKey("notebookCellKind", undefined),
|
|
763
|
+
CellHasChildren: new RawContextKey("notebookCellHasChildren", false),
|
|
764
|
+
CellHasHeader: new RawContextKey("notebookCellHasHeader", false),
|
|
765
|
+
CellFoldingState: new RawContextKey("notebookCellFoldingState", CellFoldingState.None),
|
|
766
|
+
OutlineElementTarget: new RawContextKey("notebookOutlineElementTarget", undefined)
|
|
767
767
|
};
|
|
768
768
|
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookOutlineCreator, LifecyclePhase.Eventually);
|
|
769
769
|
( Registry.as(Extensions$1.Configuration)).registerConfiguration({
|
|
@@ -775,33 +775,33 @@ const NotebookOutlineContext = {
|
|
|
775
775
|
type: "boolean",
|
|
776
776
|
default: true,
|
|
777
777
|
markdownDescription: ( localize(
|
|
778
|
-
|
|
778
|
+
16583,
|
|
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(16584, "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
|
+
16585,
|
|
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(16586, "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
|
+
16587,
|
|
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(16588, "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(16589, "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(16590, "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(16591, "Code Cell Symbols")),
|
|
866
866
|
f1: false,
|
|
867
867
|
toggled: {
|
|
868
868
|
condition: ( ContextKeyExpr.equals("config.notebook.outline.showCodeCellSymbols", true))
|