@codingame/monaco-vscode-notebook-service-override 11.1.2 → 12.0.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.d.ts +2 -1
- package/index.js +64 -1
- package/package.json +47 -15
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +43 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +109 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +13 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +72 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +23 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +30 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +18 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +76 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +61 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +10 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +52 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +28 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +51 -50
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +21 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +460 -382
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +124 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +87 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +16 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.d.ts +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +9 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +53 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +40 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +112 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +115 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +111 -117
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +11 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +5 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +9 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +113 -198
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +25 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +115 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.d.ts +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +76 -147
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +45 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +30 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +19 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +59 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +11 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +69 -113
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +194 -184
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +51 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +14 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +57 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +29 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +17 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +46 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +14 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +21 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +30 -26
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +134 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +164 -121
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +37 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +56 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +131 -55
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +48 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +12 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +38 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +75 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +31 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +2 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +78 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +45 -42
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +96 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +57 -54
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +74 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +6 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.d.ts +53 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +2 -1
- package/worker.js +2 -1
- package/workers/notebook.worker.d.ts +1 -0
- package/notebook.js +0 -50
- package/workers/notebook.worker.js +0 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { Action2, MenuId, registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
4
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
4
5
|
import { NotebookOutlineContext } from '../contrib/outline/notebookOutline.js';
|
|
5
|
-
import { FoldingController } from '@codingame/monaco-vscode-
|
|
6
|
-
import {
|
|
6
|
+
import { FoldingController } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/foldingController';
|
|
7
|
+
import { CellEditState, CellFoldingState } from '@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
8
|
+
import { executeIcon } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
7
9
|
import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
10
|
+
import { OutlineTarget } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/workbench/services/outline/browser/outline';
|
|
11
|
+
import { CellToolbarOrder, CELL_TITLE_CELL_GROUP_ID } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
12
|
+
import { executeSectionCondition } from './executeActions.js';
|
|
8
13
|
|
|
9
14
|
class NotebookRunSingleCellInSection extends Action2 {
|
|
10
15
|
constructor() {
|
|
11
16
|
super({
|
|
12
17
|
id: 'notebook.section.runSingleCell',
|
|
13
18
|
title: {
|
|
14
|
-
...( localize2(
|
|
15
|
-
mnemonicTitle: ( localize(
|
|
19
|
+
...( localize2(7526, "Run Cell")),
|
|
20
|
+
mnemonicTitle: ( localize(7527, "&&Run Cell")),
|
|
16
21
|
},
|
|
17
|
-
shortTitle: ( localize(
|
|
22
|
+
shortTitle: ( localize(7526, "Run Cell")),
|
|
18
23
|
icon: executeIcon,
|
|
19
24
|
menu: [
|
|
20
25
|
{
|
|
21
26
|
id: MenuId.NotebookOutlineActionMenu,
|
|
22
27
|
group: 'inline',
|
|
23
28
|
order: 1,
|
|
24
|
-
when: (
|
|
25
|
-
(NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code)),
|
|
26
|
-
(NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
|
|
27
|
-
(NotebookOutlineContext.CellHasChildren.toNegated()),
|
|
28
|
-
(NotebookOutlineContext.CellHasHeader.toNegated())
|
|
29
|
-
)))
|
|
29
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)), ( NotebookOutlineContext.CellHasChildren.toNegated()), ( NotebookOutlineContext.CellHasHeader.toNegated())))
|
|
30
30
|
}
|
|
31
31
|
]
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
async run(_accessor, context) {
|
|
35
|
-
if (!
|
|
35
|
+
if (!checkOutlineEntryContext(context)) {
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
context.notebookEditor.executeNotebookCells([context.outlineEntry.cell]);
|
|
@@ -43,10 +43,11 @@ class NotebookRunCellsInSection extends Action2 {
|
|
|
43
43
|
super({
|
|
44
44
|
id: 'notebook.section.runCells',
|
|
45
45
|
title: {
|
|
46
|
-
...( localize2(
|
|
47
|
-
mnemonicTitle: ( localize(
|
|
46
|
+
...( localize2(7528, "Run Cells In Section")),
|
|
47
|
+
mnemonicTitle: ( localize(7529, "&&Run Cells In Section")),
|
|
48
48
|
},
|
|
49
|
-
shortTitle: ( localize(
|
|
49
|
+
shortTitle: ( localize(7528, "Run Cells In Section")),
|
|
50
|
+
icon: executeIcon,
|
|
50
51
|
menu: [
|
|
51
52
|
{
|
|
52
53
|
id: MenuId.NotebookStickyScrollContext,
|
|
@@ -57,30 +58,45 @@ class NotebookRunCellsInSection extends Action2 {
|
|
|
57
58
|
id: MenuId.NotebookOutlineActionMenu,
|
|
58
59
|
group: 'inline',
|
|
59
60
|
order: 1,
|
|
60
|
-
when: (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader))
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: MenuId.NotebookCellTitle,
|
|
65
|
+
order: CellToolbarOrder.RunSection,
|
|
66
|
+
group: CELL_TITLE_CELL_GROUP_ID,
|
|
67
|
+
when: executeSectionCondition
|
|
66
68
|
}
|
|
67
69
|
]
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
72
|
async run(_accessor, context) {
|
|
71
|
-
|
|
73
|
+
let cell;
|
|
74
|
+
if (checkOutlineEntryContext(context)) {
|
|
75
|
+
cell = context.outlineEntry.cell;
|
|
76
|
+
}
|
|
77
|
+
else if (checkNotebookCellContext(context)) {
|
|
78
|
+
cell = context.cell;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
72
81
|
return;
|
|
73
82
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
83
|
+
if (cell.getEditState() === CellEditState.Editing) {
|
|
84
|
+
const foldingController = context.notebookEditor.getContribution(FoldingController.id);
|
|
85
|
+
foldingController.recompute();
|
|
86
|
+
}
|
|
87
|
+
const cellIdx = context.notebookEditor.getViewModel()?.getCellIndex(cell);
|
|
88
|
+
if (cellIdx === undefined) {
|
|
77
89
|
return;
|
|
78
90
|
}
|
|
79
|
-
const
|
|
91
|
+
const sectionIdx = context.notebookEditor.getViewModel()?.getFoldingStartIndex(cellIdx);
|
|
92
|
+
if (sectionIdx === undefined) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
const length = context.notebookEditor.getViewModel()?.getFoldedLength(sectionIdx);
|
|
80
96
|
if (length === undefined) {
|
|
81
97
|
return;
|
|
82
98
|
}
|
|
83
|
-
const cells = context.notebookEditor.getCellsInRange({ start:
|
|
99
|
+
const cells = context.notebookEditor.getCellsInRange({ start: sectionIdx, end: sectionIdx + length + 1 });
|
|
84
100
|
context.notebookEditor.executeNotebookCells(cells);
|
|
85
101
|
}
|
|
86
102
|
}
|
|
@@ -89,28 +105,22 @@ class NotebookFoldSection extends Action2 {
|
|
|
89
105
|
super({
|
|
90
106
|
id: 'notebook.section.foldSection',
|
|
91
107
|
title: {
|
|
92
|
-
...( localize2(
|
|
93
|
-
mnemonicTitle: ( localize(
|
|
108
|
+
...( localize2(7530, "Fold Section")),
|
|
109
|
+
mnemonicTitle: ( localize(7531, "&&Fold Section")),
|
|
94
110
|
},
|
|
95
|
-
shortTitle: ( localize(
|
|
111
|
+
shortTitle: ( localize(7530, "Fold Section")),
|
|
96
112
|
menu: [
|
|
97
113
|
{
|
|
98
114
|
id: MenuId.NotebookOutlineActionMenu,
|
|
99
115
|
group: 'notebookFolding',
|
|
100
116
|
order: 2,
|
|
101
|
-
when: (
|
|
102
|
-
(NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
|
|
103
|
-
(NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
|
|
104
|
-
NotebookOutlineContext.CellHasChildren,
|
|
105
|
-
NotebookOutlineContext.CellHasHeader,
|
|
106
|
-
(NotebookOutlineContext.CellFoldingState.isEqualTo(1 ))
|
|
107
|
-
)))
|
|
117
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, ( NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Expanded))))
|
|
108
118
|
}
|
|
109
119
|
]
|
|
110
120
|
});
|
|
111
121
|
}
|
|
112
122
|
async run(_accessor, context) {
|
|
113
|
-
if (!
|
|
123
|
+
if (!checkOutlineEntryContext(context)) {
|
|
114
124
|
return;
|
|
115
125
|
}
|
|
116
126
|
this.toggleFoldRange(context.outlineEntry, context.notebookEditor);
|
|
@@ -119,7 +129,7 @@ class NotebookFoldSection extends Action2 {
|
|
|
119
129
|
const foldingController = notebookEditor.getContribution(FoldingController.id);
|
|
120
130
|
const index = entry.index;
|
|
121
131
|
const headerLevel = entry.level;
|
|
122
|
-
const newFoldingState =
|
|
132
|
+
const newFoldingState = CellFoldingState.Collapsed;
|
|
123
133
|
foldingController.setFoldingStateDown(index, newFoldingState, headerLevel);
|
|
124
134
|
}
|
|
125
135
|
}
|
|
@@ -128,28 +138,22 @@ class NotebookExpandSection extends Action2 {
|
|
|
128
138
|
super({
|
|
129
139
|
id: 'notebook.section.expandSection',
|
|
130
140
|
title: {
|
|
131
|
-
...( localize2(
|
|
132
|
-
mnemonicTitle: ( localize(
|
|
141
|
+
...( localize2(7532, "Expand Section")),
|
|
142
|
+
mnemonicTitle: ( localize(7533, "&&Expand Section")),
|
|
133
143
|
},
|
|
134
|
-
shortTitle: ( localize(
|
|
144
|
+
shortTitle: ( localize(7532, "Expand Section")),
|
|
135
145
|
menu: [
|
|
136
146
|
{
|
|
137
147
|
id: MenuId.NotebookOutlineActionMenu,
|
|
138
148
|
group: 'notebookFolding',
|
|
139
149
|
order: 2,
|
|
140
|
-
when: (
|
|
141
|
-
(NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)),
|
|
142
|
-
(NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )),
|
|
143
|
-
NotebookOutlineContext.CellHasChildren,
|
|
144
|
-
NotebookOutlineContext.CellHasHeader,
|
|
145
|
-
(NotebookOutlineContext.CellFoldingState.isEqualTo(2 ))
|
|
146
|
-
)))
|
|
150
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane)), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, ( NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Collapsed))))
|
|
147
151
|
}
|
|
148
152
|
]
|
|
149
153
|
});
|
|
150
154
|
}
|
|
151
155
|
async run(_accessor, context) {
|
|
152
|
-
if (!
|
|
156
|
+
if (!checkOutlineEntryContext(context)) {
|
|
153
157
|
return;
|
|
154
158
|
}
|
|
155
159
|
this.toggleFoldRange(context.outlineEntry, context.notebookEditor);
|
|
@@ -158,13 +162,16 @@ class NotebookExpandSection extends Action2 {
|
|
|
158
162
|
const foldingController = notebookEditor.getContribution(FoldingController.id);
|
|
159
163
|
const index = entry.index;
|
|
160
164
|
const headerLevel = entry.level;
|
|
161
|
-
const newFoldingState =
|
|
165
|
+
const newFoldingState = CellFoldingState.Expanded;
|
|
162
166
|
foldingController.setFoldingStateDown(index, newFoldingState, headerLevel);
|
|
163
167
|
}
|
|
164
168
|
}
|
|
165
|
-
function
|
|
169
|
+
function checkOutlineEntryContext(context) {
|
|
166
170
|
return !!(context && context.notebookEditor && context.outlineEntry);
|
|
167
171
|
}
|
|
172
|
+
function checkNotebookCellContext(context) {
|
|
173
|
+
return !!(context && context.notebookEditor && context.cell);
|
|
174
|
+
}
|
|
168
175
|
registerAction2(NotebookRunSingleCellInSection);
|
|
169
176
|
registerAction2(NotebookRunCellsInSection);
|
|
170
177
|
registerAction2(NotebookFoldSection);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,50 +1,40 @@
|
|
|
1
|
+
|
|
1
2
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
2
3
|
import { registerAction2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
4
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
4
5
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
5
|
-
import { KERNEL_HAS_VARIABLE_PROVIDER } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
6
|
+
import { KERNEL_HAS_VARIABLE_PROVIDER } from '@codingame/monaco-vscode-4a36e358-d94d-55e0-86ee-3bcd543d9d3f-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
6
7
|
import { NOTEBOOK_VARIABLE_VIEW_ENABLED } from '../contrib/notebookVariables/notebookVariableContextKeys.js';
|
|
7
|
-
import { variablesViewIcon } from '@codingame/monaco-vscode-
|
|
8
|
-
import { NotebookAction } from '@codingame/monaco-vscode-
|
|
8
|
+
import { variablesViewIcon } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
9
|
+
import { NotebookAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
9
10
|
|
|
10
11
|
const OPEN_VARIABLES_VIEW_COMMAND_ID = 'notebook.openVariablesView';
|
|
11
12
|
registerAction2(class OpenVariablesViewAction extends NotebookAction {
|
|
12
13
|
constructor() {
|
|
13
14
|
super({
|
|
14
15
|
id: OPEN_VARIABLES_VIEW_COMMAND_ID,
|
|
15
|
-
title: ( localize2(
|
|
16
|
+
title: ( localize2(7534, "Variables")),
|
|
16
17
|
icon: variablesViewIcon,
|
|
17
18
|
menu: [
|
|
18
19
|
{
|
|
19
20
|
id: MenuId.InteractiveToolbar,
|
|
20
21
|
group: 'navigation',
|
|
21
|
-
when: (
|
|
22
|
-
|
|
23
|
-
(ContextKeyExpr.notEquals('jupyter.kernel.isjupyter', true)),
|
|
24
|
-
NOTEBOOK_VARIABLE_VIEW_ENABLED
|
|
25
|
-
)))
|
|
22
|
+
when: ( ContextKeyExpr.and(KERNEL_HAS_VARIABLE_PROVIDER, (
|
|
23
|
+
ContextKeyExpr.notEquals('jupyter.kernel.isjupyter', true)), NOTEBOOK_VARIABLE_VIEW_ENABLED))
|
|
26
24
|
},
|
|
27
25
|
{
|
|
28
26
|
id: MenuId.EditorTitle,
|
|
29
27
|
order: -1,
|
|
30
28
|
group: 'navigation',
|
|
31
|
-
when: (
|
|
32
|
-
|
|
33
|
-
(ContextKeyExpr.notEquals('jupyter.kernel.isjupyter', true)),
|
|
34
|
-
(ContextKeyExpr.notEquals('config.notebook.globalToolbar', true)),
|
|
35
|
-
NOTEBOOK_VARIABLE_VIEW_ENABLED
|
|
36
|
-
)))
|
|
29
|
+
when: ( ContextKeyExpr.and(KERNEL_HAS_VARIABLE_PROVIDER, (
|
|
30
|
+
ContextKeyExpr.notEquals('jupyter.kernel.isjupyter', true)), ( ContextKeyExpr.notEquals('config.notebook.globalToolbar', true)), NOTEBOOK_VARIABLE_VIEW_ENABLED))
|
|
37
31
|
},
|
|
38
32
|
{
|
|
39
33
|
id: MenuId.NotebookToolbar,
|
|
40
34
|
order: -1,
|
|
41
35
|
group: 'navigation',
|
|
42
|
-
when: (
|
|
43
|
-
|
|
44
|
-
(ContextKeyExpr.notEquals('jupyter.kernel.isjupyter', true)),
|
|
45
|
-
(ContextKeyExpr.equals('config.notebook.globalToolbar', true)),
|
|
46
|
-
NOTEBOOK_VARIABLE_VIEW_ENABLED
|
|
47
|
-
)))
|
|
36
|
+
when: ( ContextKeyExpr.and(KERNEL_HAS_VARIABLE_PROVIDER, (
|
|
37
|
+
ContextKeyExpr.notEquals('jupyter.kernel.isjupyter', true)), ( ContextKeyExpr.equals('config.notebook.globalToolbar', true)), NOTEBOOK_VARIABLE_VIEW_ENABLED))
|
|
48
38
|
}
|
|
49
39
|
]
|
|
50
40
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|