@codingame/monaco-vscode-notebook-service-override 25.1.2 → 26.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.js +2 -2
- package/package.json +3 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +112 -94
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +95 -96
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +28 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +15 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +22 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +25 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +37 -44
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +211 -115
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +16 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +5 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +57 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +24 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +78 -76
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +14 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +43 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +65 -34
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +19 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +6 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +15 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +28 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +211 -170
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +158 -156
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +109 -105
- 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 +28 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +26 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +23 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +72 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +233 -186
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +22 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +239 -151
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +85 -86
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +25 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +13 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +8 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +218 -196
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +258 -255
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +106 -98
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +63 -49
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +55 -64
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +21 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +149 -129
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.d.ts +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +286 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput.js +82 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +452 -363
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +44 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +9 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +203 -207
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +148 -104
- package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +19 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +9 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +34 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +29 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +70 -52
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +31 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +78 -41
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +37 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +8 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +214 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +38 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.js +24 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js +2 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +26 -15
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +35 -15
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +468 -258
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +113 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +74 -58
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +7 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.js +72 -16
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +70 -51
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +195 -149
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +60 -81
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +7 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +104 -66
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +115 -77
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +42 -26
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +19 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -198
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +0 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +0 -333
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +0 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -261
|
@@ -12,7 +12,7 @@ import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
12
12
|
import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
13
13
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
14
14
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
15
|
-
import { NotebookFindContrib } from '@codingame/monaco-vscode-
|
|
15
|
+
import { NotebookFindContrib } from '@codingame/monaco-vscode-katex-common/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget';
|
|
16
16
|
import { NotebookMultiCellAction } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
17
17
|
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
18
18
|
import { registerNotebookContribution } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
@@ -26,8 +26,8 @@ registerNotebookContribution(NotebookFindContrib.id, NotebookFindContrib);
|
|
|
26
26
|
registerAction2(class extends Action2 {
|
|
27
27
|
constructor() {
|
|
28
28
|
super({
|
|
29
|
-
id:
|
|
30
|
-
title: ( localize2(
|
|
29
|
+
id: "notebook.hideFind",
|
|
30
|
+
title: ( localize2(9589, "Hide Find in Notebook")),
|
|
31
31
|
keybinding: {
|
|
32
32
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, CONTEXT_FIND_WIDGET_VISIBLE)),
|
|
33
33
|
primary: KeyCode.Escape,
|
|
@@ -49,8 +49,8 @@ registerAction2(class extends Action2 {
|
|
|
49
49
|
registerAction2(class extends NotebookMultiCellAction {
|
|
50
50
|
constructor() {
|
|
51
51
|
super({
|
|
52
|
-
id:
|
|
53
|
-
title: ( localize2(
|
|
52
|
+
id: "notebook.find",
|
|
53
|
+
title: ( localize2(9590, "Find in Notebook")),
|
|
54
54
|
keybinding: {
|
|
55
55
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.or(NOTEBOOK_IS_ACTIVE_EDITOR, INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR)), ( EditorContextKeys.focus.toNegated()))),
|
|
56
56
|
primary: KeyCode.KeyF | KeyMod.CtrlCmd,
|
|
@@ -65,7 +65,11 @@ registerAction2(class extends NotebookMultiCellAction {
|
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
67
67
|
const controller = editor.getContribution(NotebookFindContrib.id);
|
|
68
|
-
controller.show(undefined, {
|
|
68
|
+
controller.show(undefined, {
|
|
69
|
+
findScope: {
|
|
70
|
+
findScopeType: NotebookFindScopeType.None
|
|
71
|
+
}
|
|
72
|
+
});
|
|
69
73
|
}
|
|
70
74
|
});
|
|
71
75
|
function notebookContainsTextModel(uri, textModel) {
|
|
@@ -78,16 +82,19 @@ function notebookContainsTextModel(uri, textModel) {
|
|
|
78
82
|
return false;
|
|
79
83
|
}
|
|
80
84
|
function getSearchStringOptions(editor, opts) {
|
|
81
|
-
if (opts.seedSearchStringFromSelection ===
|
|
82
|
-
const selectionSearchString = getSelectionSearchString(
|
|
85
|
+
if (opts.seedSearchStringFromSelection === "single") {
|
|
86
|
+
const selectionSearchString = getSelectionSearchString(
|
|
87
|
+
editor,
|
|
88
|
+
opts.seedSearchStringFromSelection,
|
|
89
|
+
opts.seedSearchStringFromNonEmptySelection
|
|
90
|
+
);
|
|
83
91
|
if (selectionSearchString) {
|
|
84
92
|
return {
|
|
85
93
|
searchString: selectionSearchString,
|
|
86
94
|
selection: editor.getSelection()
|
|
87
95
|
};
|
|
88
96
|
}
|
|
89
|
-
}
|
|
90
|
-
else if (opts.seedSearchStringFromSelection === 'multiple' && !opts.updateSearchScope) {
|
|
97
|
+
} else if (opts.seedSearchStringFromSelection === "multiple" && !opts.updateSearchScope) {
|
|
91
98
|
const selectionSearchString = getSelectionSearchString(editor, opts.seedSearchStringFromSelection);
|
|
92
99
|
if (selectionSearchString) {
|
|
93
100
|
return {
|
|
@@ -110,8 +117,7 @@ function isNotebookEditorValidForSearch(accessor, editor, codeEditor) {
|
|
|
110
117
|
const textEditor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();
|
|
111
118
|
if (editor.hasModel() && textEditor && textEditor.hasModel() && notebookContainsTextModel(editor.textModel.uri, textEditor.getModel())) {
|
|
112
119
|
return true;
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
120
|
+
} else {
|
|
115
121
|
return false;
|
|
116
122
|
}
|
|
117
123
|
}
|
|
@@ -125,8 +131,8 @@ function openFindWidget(controller, editor, codeEditor, focusWidget = true) {
|
|
|
125
131
|
return false;
|
|
126
132
|
}
|
|
127
133
|
const searchStringOptions = getSearchStringOptions(codeEditor, {
|
|
128
|
-
seedSearchStringFromSelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection !==
|
|
129
|
-
seedSearchStringFromNonEmptySelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection ===
|
|
134
|
+
seedSearchStringFromSelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection !== "never" ? "single" : "none",
|
|
135
|
+
seedSearchStringFromNonEmptySelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection === "selection",
|
|
130
136
|
seedSearchStringFromGlobalClipboard: codeEditor.getOption(EditorOption.find).globalFindClipboard,
|
|
131
137
|
updateSearchScope: false,
|
|
132
138
|
loop: codeEditor.getOption(EditorOption.find).loop
|
|
@@ -138,13 +144,17 @@ function openFindWidget(controller, editor, codeEditor, focusWidget = true) {
|
|
|
138
144
|
const cell = editor.getCellByHandle(data.handle);
|
|
139
145
|
if (cell) {
|
|
140
146
|
options = {
|
|
141
|
-
searchStringSeededFrom: {
|
|
147
|
+
searchStringSeededFrom: {
|
|
148
|
+
cell,
|
|
149
|
+
range: searchStringOptions.selection
|
|
150
|
+
},
|
|
142
151
|
focus: focusWidget
|
|
143
152
|
};
|
|
144
153
|
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
154
|
+
} else {
|
|
155
|
+
options = {
|
|
156
|
+
focus: focusWidget
|
|
157
|
+
};
|
|
148
158
|
}
|
|
149
159
|
controller.show(searchStringOptions?.searchString, options);
|
|
150
160
|
return true;
|
|
@@ -162,8 +172,7 @@ function findWidgetAction(accessor, codeEditor, next) {
|
|
|
162
172
|
if (controller.isVisible()) {
|
|
163
173
|
next ? controller.findNext() : controller.findPrevious();
|
|
164
174
|
return true;
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
175
|
+
} else {
|
|
167
176
|
return openFindWidget(controller, editor, codeEditor, false);
|
|
168
177
|
}
|
|
169
178
|
}
|
|
@@ -198,8 +207,8 @@ StartFindReplaceAction.addImplementation(100, (accessor, codeEditor, args) => {
|
|
|
198
207
|
}
|
|
199
208
|
const controller = editor.getContribution(NotebookFindContrib.id);
|
|
200
209
|
const searchStringOptions = getSearchStringOptions(codeEditor, {
|
|
201
|
-
seedSearchStringFromSelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection !==
|
|
202
|
-
seedSearchStringFromNonEmptySelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection ===
|
|
210
|
+
seedSearchStringFromSelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection !== "never" ? "single" : "none",
|
|
211
|
+
seedSearchStringFromNonEmptySelection: codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection === "selection",
|
|
203
212
|
seedSearchStringFromGlobalClipboard: codeEditor.getOption(EditorOption.find).globalFindClipboard,
|
|
204
213
|
updateSearchScope: false,
|
|
205
214
|
loop: codeEditor.getOption(EditorOption.find).loop
|
|
@@ -219,12 +228,15 @@ PreviousMatchFindAction.addImplementation(100, (accessor, codeEditor, args) => {
|
|
|
219
228
|
registerAction2(class extends Action2 {
|
|
220
229
|
constructor() {
|
|
221
230
|
super({
|
|
222
|
-
id:
|
|
223
|
-
title: ( localize2(
|
|
231
|
+
id: "notebook.findNext.fromWidget",
|
|
232
|
+
title: ( localize2(9591, "Find Next")),
|
|
224
233
|
keybinding: {
|
|
225
234
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, CONTEXT_FIND_WIDGET_VISIBLE)),
|
|
226
235
|
primary: KeyCode.F3,
|
|
227
|
-
mac: {
|
|
236
|
+
mac: {
|
|
237
|
+
primary: KeyMod.CtrlCmd | KeyCode.KeyG,
|
|
238
|
+
secondary: [KeyCode.F3]
|
|
239
|
+
},
|
|
228
240
|
weight: KeybindingWeight.WorkbenchContrib + 1
|
|
229
241
|
}
|
|
230
242
|
});
|
|
@@ -236,12 +248,15 @@ registerAction2(class extends Action2 {
|
|
|
236
248
|
registerAction2(class extends Action2 {
|
|
237
249
|
constructor() {
|
|
238
250
|
super({
|
|
239
|
-
id:
|
|
240
|
-
title: ( localize2(
|
|
251
|
+
id: "notebook.findPrevious.fromWidget",
|
|
252
|
+
title: ( localize2(9592, "Find Previous")),
|
|
241
253
|
keybinding: {
|
|
242
254
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, CONTEXT_FIND_WIDGET_VISIBLE)),
|
|
243
255
|
primary: KeyMod.Shift | KeyCode.F3,
|
|
244
|
-
mac: {
|
|
256
|
+
mac: {
|
|
257
|
+
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG,
|
|
258
|
+
secondary: [KeyMod.Shift | KeyCode.F3]
|
|
259
|
+
},
|
|
245
260
|
weight: KeybindingWeight.WorkbenchContrib + 1
|
|
246
261
|
}
|
|
247
262
|
});
|
|
@@ -33,14 +33,16 @@ import { CodeActionParticipantUtils } from '../saveParticipants/saveParticipants
|
|
|
33
33
|
registerAction2(class extends Action2 {
|
|
34
34
|
constructor() {
|
|
35
35
|
super({
|
|
36
|
-
id:
|
|
37
|
-
title: ( localize2(
|
|
36
|
+
id: "notebook.format",
|
|
37
|
+
title: ( localize2(9613, "Format Notebook")),
|
|
38
38
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
39
39
|
precondition: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_EDITABLE)),
|
|
40
40
|
keybinding: {
|
|
41
41
|
when: ( EditorContextKeys.editorTextFocus.toNegated()),
|
|
42
42
|
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
|
43
|
-
linux: {
|
|
43
|
+
linux: {
|
|
44
|
+
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI
|
|
45
|
+
},
|
|
44
46
|
weight: KeybindingWeight.WorkbenchContrib
|
|
45
47
|
},
|
|
46
48
|
f1: true,
|
|
@@ -50,7 +52,7 @@ registerAction2(class extends Action2 {
|
|
|
50
52
|
EditorContextKeys.inCompositeEditor,
|
|
51
53
|
EditorContextKeys.hasDocumentFormattingProvider
|
|
52
54
|
)),
|
|
53
|
-
group:
|
|
55
|
+
group: "1_modification",
|
|
54
56
|
order: 1.3
|
|
55
57
|
}
|
|
56
58
|
});
|
|
@@ -67,15 +69,26 @@ registerAction2(class extends Action2 {
|
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
const notebook = editor.textModel;
|
|
70
|
-
const formatApplied = await instantiationService.invokeFunction(
|
|
72
|
+
const formatApplied = await instantiationService.invokeFunction(
|
|
73
|
+
CodeActionParticipantUtils.checkAndRunFormatCodeAction,
|
|
74
|
+
notebook,
|
|
75
|
+
Progress.None,
|
|
76
|
+
CancellationToken.None
|
|
77
|
+
);
|
|
71
78
|
const disposable = ( new DisposableStore());
|
|
72
79
|
try {
|
|
73
80
|
if (!formatApplied) {
|
|
74
|
-
const allCellEdits = await Promise.all(( notebook.cells.map(async
|
|
81
|
+
const allCellEdits = await Promise.all(( notebook.cells.map(async cell => {
|
|
75
82
|
const ref = await textModelService.createModelReference(cell.uri);
|
|
76
83
|
disposable.add(ref);
|
|
77
84
|
const model = ref.object.textEditorModel;
|
|
78
|
-
const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(
|
|
85
|
+
const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(
|
|
86
|
+
editorWorkerService,
|
|
87
|
+
languageFeaturesService,
|
|
88
|
+
model,
|
|
89
|
+
FormattingMode.Explicit,
|
|
90
|
+
CancellationToken.None
|
|
91
|
+
);
|
|
79
92
|
const edits = [];
|
|
80
93
|
if (formatEdits) {
|
|
81
94
|
for (const edit of formatEdits) {
|
|
@@ -85,10 +98,12 @@ registerAction2(class extends Action2 {
|
|
|
85
98
|
}
|
|
86
99
|
return [];
|
|
87
100
|
})));
|
|
88
|
-
await bulkEditService.apply( allCellEdits.flat(), {
|
|
101
|
+
await bulkEditService.apply( allCellEdits.flat(), {
|
|
102
|
+
label: ( localize(9614, "Format Notebook")),
|
|
103
|
+
code: "undoredo.formatNotebook"
|
|
104
|
+
});
|
|
89
105
|
}
|
|
90
|
-
}
|
|
91
|
-
finally {
|
|
106
|
+
} finally {
|
|
92
107
|
disposable.dispose();
|
|
93
108
|
}
|
|
94
109
|
}
|
|
@@ -96,8 +111,8 @@ registerAction2(class extends Action2 {
|
|
|
96
111
|
registerEditorAction(class FormatCellAction extends EditorAction {
|
|
97
112
|
constructor() {
|
|
98
113
|
super({
|
|
99
|
-
id:
|
|
100
|
-
label: ( localize2(
|
|
114
|
+
id: "notebook.formatCell",
|
|
115
|
+
label: ( localize2(9615, "Format Cell")),
|
|
101
116
|
precondition: ( ContextKeyExpr.and(
|
|
102
117
|
NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
103
118
|
NOTEBOOK_EDITOR_EDITABLE,
|
|
@@ -108,11 +123,13 @@ registerEditorAction(class FormatCellAction extends EditorAction {
|
|
|
108
123
|
kbOpts: {
|
|
109
124
|
kbExpr: ( ContextKeyExpr.and(EditorContextKeys.editorTextFocus)),
|
|
110
125
|
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KeyF,
|
|
111
|
-
linux: {
|
|
126
|
+
linux: {
|
|
127
|
+
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI
|
|
128
|
+
},
|
|
112
129
|
weight: KeybindingWeight.EditorContrib
|
|
113
130
|
},
|
|
114
131
|
contextMenuOpts: {
|
|
115
|
-
group:
|
|
132
|
+
group: "1_modification",
|
|
116
133
|
order: 1.301
|
|
117
134
|
}
|
|
118
135
|
});
|
|
@@ -120,12 +137,26 @@ registerEditorAction(class FormatCellAction extends EditorAction {
|
|
|
120
137
|
async run(accessor, editor) {
|
|
121
138
|
if (editor.hasModel()) {
|
|
122
139
|
const instaService = accessor.get(IInstantiationService);
|
|
123
|
-
await instaService.invokeFunction(
|
|
140
|
+
await instaService.invokeFunction(
|
|
141
|
+
formatDocumentWithSelectedProvider,
|
|
142
|
+
editor,
|
|
143
|
+
FormattingMode.Explicit,
|
|
144
|
+
Progress.None,
|
|
145
|
+
CancellationToken.None,
|
|
146
|
+
true
|
|
147
|
+
);
|
|
124
148
|
}
|
|
125
149
|
}
|
|
126
150
|
});
|
|
127
151
|
let FormatOnCellExecutionParticipant = class FormatOnCellExecutionParticipant {
|
|
128
|
-
constructor(
|
|
152
|
+
constructor(
|
|
153
|
+
bulkEditService,
|
|
154
|
+
languageFeaturesService,
|
|
155
|
+
textModelService,
|
|
156
|
+
editorWorkerService,
|
|
157
|
+
configurationService,
|
|
158
|
+
_notebookService
|
|
159
|
+
) {
|
|
129
160
|
this.bulkEditService = bulkEditService;
|
|
130
161
|
this.languageFeaturesService = languageFeaturesService;
|
|
131
162
|
this.textModelService = textModelService;
|
|
@@ -140,7 +171,7 @@ let FormatOnCellExecutionParticipant = class FormatOnCellExecutionParticipant {
|
|
|
140
171
|
}
|
|
141
172
|
const disposable = ( new DisposableStore());
|
|
142
173
|
try {
|
|
143
|
-
const allCellEdits = await Promise.all(( executions.map(async
|
|
174
|
+
const allCellEdits = await Promise.all(( executions.map(async cellExecution => {
|
|
144
175
|
const nbModel = this._notebookService.getNotebookTextModel(cellExecution.notebook);
|
|
145
176
|
if (!nbModel) {
|
|
146
177
|
return [];
|
|
@@ -158,7 +189,13 @@ let FormatOnCellExecutionParticipant = class FormatOnCellExecutionParticipant {
|
|
|
158
189
|
const ref = await this.textModelService.createModelReference(activeCell.uri);
|
|
159
190
|
disposable.add(ref);
|
|
160
191
|
const model = ref.object.textEditorModel;
|
|
161
|
-
const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(
|
|
192
|
+
const formatEdits = await getDocumentFormattingEditsWithSelectedProvider(
|
|
193
|
+
this.editorWorkerService,
|
|
194
|
+
this.languageFeaturesService,
|
|
195
|
+
model,
|
|
196
|
+
FormattingMode.Silent,
|
|
197
|
+
CancellationToken.None
|
|
198
|
+
);
|
|
162
199
|
const edits = [];
|
|
163
200
|
if (formatEdits) {
|
|
164
201
|
edits.push(...( formatEdits.map(edit => ( new ResourceTextEdit(model.uri, edit, model.getVersionId())))));
|
|
@@ -166,21 +203,16 @@ let FormatOnCellExecutionParticipant = class FormatOnCellExecutionParticipant {
|
|
|
166
203
|
}
|
|
167
204
|
return [];
|
|
168
205
|
})));
|
|
169
|
-
await this.bulkEditService.apply( allCellEdits.flat(), {
|
|
170
|
-
|
|
171
|
-
|
|
206
|
+
await this.bulkEditService.apply( allCellEdits.flat(), {
|
|
207
|
+
label: ( localize(9616, "Format Cells")),
|
|
208
|
+
code: "undoredo.notebooks.onWillExecuteFormat"
|
|
209
|
+
});
|
|
210
|
+
} finally {
|
|
172
211
|
disposable.dispose();
|
|
173
212
|
}
|
|
174
213
|
}
|
|
175
214
|
};
|
|
176
|
-
FormatOnCellExecutionParticipant = ( __decorate([
|
|
177
|
-
( __param(0, IBulkEditService)),
|
|
178
|
-
( __param(1, ILanguageFeaturesService)),
|
|
179
|
-
( __param(2, ITextModelService)),
|
|
180
|
-
( __param(3, IEditorWorkerService)),
|
|
181
|
-
( __param(4, IConfigurationService)),
|
|
182
|
-
( __param(5, INotebookService))
|
|
183
|
-
], FormatOnCellExecutionParticipant));
|
|
215
|
+
FormatOnCellExecutionParticipant = ( __decorate([( __param(0, IBulkEditService)), ( __param(1, ILanguageFeaturesService)), ( __param(2, ITextModelService)), ( __param(3, IEditorWorkerService)), ( __param(4, IConfigurationService)), ( __param(5, INotebookService))], FormatOnCellExecutionParticipant));
|
|
184
216
|
let CellExecutionParticipantsContribution = class CellExecutionParticipantsContribution extends Disposable {
|
|
185
217
|
constructor(instantiationService, notebookExecutionService) {
|
|
186
218
|
super();
|
|
@@ -189,13 +221,12 @@ let CellExecutionParticipantsContribution = class CellExecutionParticipantsContr
|
|
|
189
221
|
this.registerKernelExecutionParticipants();
|
|
190
222
|
}
|
|
191
223
|
registerKernelExecutionParticipants() {
|
|
192
|
-
this._register(
|
|
224
|
+
this._register(
|
|
225
|
+
this.notebookExecutionService.registerExecutionParticipant(this.instantiationService.createInstance(FormatOnCellExecutionParticipant))
|
|
226
|
+
);
|
|
193
227
|
}
|
|
194
228
|
};
|
|
195
|
-
CellExecutionParticipantsContribution = ( __decorate([
|
|
196
|
-
( __param(0, IInstantiationService)),
|
|
197
|
-
( __param(1, INotebookExecutionService))
|
|
198
|
-
], CellExecutionParticipantsContribution));
|
|
229
|
+
CellExecutionParticipantsContribution = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, INotebookExecutionService))], CellExecutionParticipantsContribution));
|
|
199
230
|
const workbenchContributionsRegistry = ( Registry.as(Extensions.Workbench));
|
|
200
231
|
workbenchContributionsRegistry.registerWorkbenchContribution(CellExecutionParticipantsContribution, LifecyclePhase.Restored);
|
|
201
232
|
|
|
@@ -19,13 +19,19 @@ import { NotebookEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
19
19
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
20
20
|
import { LifecyclePhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
21
21
|
|
|
22
|
-
const hasOpenedNotebookKey =
|
|
23
|
-
const hasShownGettingStartedKey =
|
|
22
|
+
const hasOpenedNotebookKey = "hasOpenedNotebook";
|
|
23
|
+
const hasShownGettingStartedKey = "hasShownNotebookGettingStarted";
|
|
24
24
|
let NotebookGettingStarted = class NotebookGettingStarted extends Disposable {
|
|
25
|
-
constructor(
|
|
25
|
+
constructor(
|
|
26
|
+
_editorService,
|
|
27
|
+
_storageService,
|
|
28
|
+
_contextKeyService,
|
|
29
|
+
_commandService,
|
|
30
|
+
_configurationService
|
|
31
|
+
) {
|
|
26
32
|
super();
|
|
27
33
|
const hasOpenedNotebook = HAS_OPENED_NOTEBOOK.bindTo(_contextKeyService);
|
|
28
|
-
const memento = ( new Memento(
|
|
34
|
+
const memento = ( new Memento("notebookGettingStarted2", _storageService));
|
|
29
35
|
const storedValue = memento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
|
|
30
36
|
if (storedValue[hasOpenedNotebookKey]) {
|
|
31
37
|
hasOpenedNotebook.set(true);
|
|
@@ -36,7 +42,10 @@ let NotebookGettingStarted = class NotebookGettingStarted extends Disposable {
|
|
|
36
42
|
hasOpenedNotebook.set(true);
|
|
37
43
|
storedValue[hasOpenedNotebookKey] = true;
|
|
38
44
|
if (needToShowGettingStarted) {
|
|
39
|
-
_commandService.executeCommand(
|
|
45
|
+
_commandService.executeCommand("workbench.action.openWalkthrough", {
|
|
46
|
+
category: "notebooks",
|
|
47
|
+
step: "notebookProfile"
|
|
48
|
+
}, true);
|
|
40
49
|
storedValue[hasShownGettingStartedKey] = true;
|
|
41
50
|
}
|
|
42
51
|
memento.saveMemento();
|
|
@@ -54,27 +63,21 @@ let NotebookGettingStarted = class NotebookGettingStarted extends Disposable {
|
|
|
54
63
|
}
|
|
55
64
|
}
|
|
56
65
|
};
|
|
57
|
-
NotebookGettingStarted = ( __decorate([
|
|
58
|
-
( __param(0, IEditorService)),
|
|
59
|
-
( __param(1, IStorageService)),
|
|
60
|
-
( __param(2, IContextKeyService)),
|
|
61
|
-
( __param(3, ICommandService)),
|
|
62
|
-
( __param(4, IConfigurationService))
|
|
63
|
-
], NotebookGettingStarted));
|
|
66
|
+
NotebookGettingStarted = ( __decorate([( __param(0, IEditorService)), ( __param(1, IStorageService)), ( __param(2, IContextKeyService)), ( __param(3, ICommandService)), ( __param(4, IConfigurationService))], NotebookGettingStarted));
|
|
64
67
|
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookGettingStarted, LifecyclePhase.Restored);
|
|
65
68
|
registerAction2(class NotebookClearNotebookLayoutAction extends Action2 {
|
|
66
69
|
constructor() {
|
|
67
70
|
super({
|
|
68
|
-
id:
|
|
69
|
-
title: ( localize2(
|
|
71
|
+
id: "workbench.notebook.layout.gettingStarted",
|
|
72
|
+
title: ( localize2(9617, "Reset notebook getting started")),
|
|
70
73
|
f1: true,
|
|
71
74
|
precondition: ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)),
|
|
72
|
-
category: Categories.Developer
|
|
75
|
+
category: Categories.Developer
|
|
73
76
|
});
|
|
74
77
|
}
|
|
75
78
|
run(accessor) {
|
|
76
79
|
const storageService = accessor.get(IStorageService);
|
|
77
|
-
const memento = ( new Memento(
|
|
80
|
+
const memento = ( new Memento("notebookGettingStarted", storageService));
|
|
78
81
|
const storedValue = memento.getMemento(StorageScope.PROFILE, StorageTarget.USER);
|
|
79
82
|
storedValue[hasOpenedNotebookKey] = undefined;
|
|
80
83
|
memento.saveMemento();
|
|
@@ -21,12 +21,12 @@ let NotebookKernelDetection = class NotebookKernelDetection extends Disposable {
|
|
|
21
21
|
_registerListeners() {
|
|
22
22
|
this._localDisposableStore.clear();
|
|
23
23
|
this._localDisposableStore.add(this._extensionService.onWillActivateByEvent(e => {
|
|
24
|
-
if (e.event.startsWith(
|
|
24
|
+
if (e.event.startsWith("onNotebook:")) {
|
|
25
25
|
if (this._extensionService.activationEventIsDone(e.event)) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
const notebookType = e.event.substring(
|
|
29
|
-
if (notebookType ===
|
|
28
|
+
const notebookType = e.event.substring("onNotebook:".length);
|
|
29
|
+
if (notebookType === "*") {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
let shouldStartDetection = false;
|
|
@@ -40,7 +40,7 @@ let NotebookKernelDetection = class NotebookKernelDetection extends Disposable {
|
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
if (shouldStartDetection && !( this._detectionMap.has(notebookType))) {
|
|
43
|
-
this._notebookLoggingService.debug(
|
|
43
|
+
this._notebookLoggingService.debug("KernelDetection", `start extension activation for ${notebookType}`);
|
|
44
44
|
const task = this._notebookKernelService.registerNotebookKernelDetectionTask({
|
|
45
45
|
notebookType: notebookType
|
|
46
46
|
});
|
|
@@ -57,7 +57,7 @@ let NotebookKernelDetection = class NotebookKernelDetection extends Disposable {
|
|
|
57
57
|
const taskToDelete = [];
|
|
58
58
|
for (const [notebookType, task] of this._detectionMap) {
|
|
59
59
|
if (this._extensionService.activationEventIsDone(`onNotebook:${notebookType}`)) {
|
|
60
|
-
this._notebookLoggingService.debug(
|
|
60
|
+
this._notebookLoggingService.debug("KernelDetection", `finish extension activation for ${notebookType}`);
|
|
61
61
|
taskToDelete.push(notebookType);
|
|
62
62
|
task.dispose();
|
|
63
63
|
}
|
|
@@ -76,9 +76,5 @@ let NotebookKernelDetection = class NotebookKernelDetection extends Disposable {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
|
-
NotebookKernelDetection = ( __decorate([
|
|
80
|
-
( __param(0, INotebookKernelService)),
|
|
81
|
-
( __param(1, IExtensionService)),
|
|
82
|
-
( __param(2, INotebookLoggingService))
|
|
83
|
-
], NotebookKernelDetection));
|
|
79
|
+
NotebookKernelDetection = ( __decorate([( __param(0, INotebookKernelService)), ( __param(1, IExtensionService)), ( __param(2, INotebookLoggingService))], NotebookKernelDetection));
|
|
84
80
|
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookKernelDetection, LifecyclePhase.Restored);
|
|
@@ -5,17 +5,17 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
5
5
|
import { NOTEBOOK_ACTIONS_CATEGORY } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
6
6
|
import { NotebookSetting } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
7
7
|
|
|
8
|
-
const TOGGLE_CELL_TOOLBAR_POSITION =
|
|
8
|
+
const TOGGLE_CELL_TOOLBAR_POSITION = "notebook.toggleCellToolbarPosition";
|
|
9
9
|
class ToggleCellToolbarPositionAction extends Action2 {
|
|
10
10
|
constructor() {
|
|
11
11
|
super({
|
|
12
12
|
id: TOGGLE_CELL_TOOLBAR_POSITION,
|
|
13
|
-
title: ( localize2(
|
|
13
|
+
title: ( localize2(9618, "Toggle Cell Toolbar Position")),
|
|
14
14
|
menu: [{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
id: MenuId.NotebookCellTitle,
|
|
16
|
+
group: "View",
|
|
17
|
+
order: 1
|
|
18
|
+
}],
|
|
19
19
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
20
20
|
f1: false
|
|
21
21
|
});
|
|
@@ -31,26 +31,24 @@ class ToggleCellToolbarPositionAction extends Action2 {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
togglePosition(viewType, toolbarPosition) {
|
|
34
|
-
if (typeof toolbarPosition ===
|
|
35
|
-
if ([
|
|
36
|
-
const newViewValue = toolbarPosition ===
|
|
34
|
+
if (typeof toolbarPosition === "string") {
|
|
35
|
+
if (["left", "right", "hidden"].indexOf(toolbarPosition) >= 0) {
|
|
36
|
+
const newViewValue = toolbarPosition === "right" ? "left" : "right";
|
|
37
37
|
const config = {
|
|
38
38
|
default: toolbarPosition
|
|
39
39
|
};
|
|
40
40
|
config[viewType] = newViewValue;
|
|
41
41
|
return config;
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
42
|
+
} else {
|
|
44
43
|
const config = {
|
|
45
|
-
default:
|
|
44
|
+
default: "right"
|
|
46
45
|
};
|
|
47
|
-
config[viewType] =
|
|
46
|
+
config[viewType] = "left";
|
|
48
47
|
return config;
|
|
49
48
|
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const newViewValue = oldValue === 'right' ? 'left' : 'right';
|
|
49
|
+
} else {
|
|
50
|
+
const oldValue = toolbarPosition[viewType] ?? toolbarPosition["default"] ?? "right";
|
|
51
|
+
const newViewValue = oldValue === "right" ? "left" : "right";
|
|
54
52
|
const newConfig = {
|
|
55
53
|
...toolbarPosition
|
|
56
54
|
};
|
|
@@ -25,7 +25,9 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/sear
|
|
|
25
25
|
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
26
26
|
|
|
27
27
|
let MarkerListProvider = class MarkerListProvider {
|
|
28
|
-
static {
|
|
28
|
+
static {
|
|
29
|
+
this.ID = "workbench.contrib.markerListProvider";
|
|
30
|
+
}
|
|
29
31
|
constructor(_markerService, markerNavigation, _configService) {
|
|
30
32
|
this._markerService = _markerService;
|
|
31
33
|
this._configService = _configService;
|
|
@@ -48,13 +50,11 @@ let MarkerListProvider = class MarkerListProvider {
|
|
|
48
50
|
}, this._markerService, this._configService));
|
|
49
51
|
}
|
|
50
52
|
};
|
|
51
|
-
MarkerListProvider = ( __decorate([
|
|
52
|
-
( __param(0, IMarkerService)),
|
|
53
|
-
( __param(1, IMarkerNavigationService)),
|
|
54
|
-
( __param(2, IConfigurationService))
|
|
55
|
-
], MarkerListProvider));
|
|
53
|
+
MarkerListProvider = ( __decorate([( __param(0, IMarkerService)), ( __param(1, IMarkerNavigationService)), ( __param(2, IConfigurationService))], MarkerListProvider));
|
|
56
54
|
let NotebookMarkerDecorationContribution = class NotebookMarkerDecorationContribution extends Disposable {
|
|
57
|
-
static {
|
|
55
|
+
static {
|
|
56
|
+
this.id = "workbench.notebook.markerDecoration";
|
|
57
|
+
}
|
|
58
58
|
constructor(_notebookEditor, _markerService) {
|
|
59
59
|
super();
|
|
60
60
|
this._notebookEditor = _notebookEditor;
|
|
@@ -74,10 +74,18 @@ let NotebookMarkerDecorationContribution = class NotebookMarkerDecorationContrib
|
|
|
74
74
|
}
|
|
75
75
|
const cellDecorations = [];
|
|
76
76
|
this._notebookEditor.getCellsInRange().forEach(cell => {
|
|
77
|
-
const marker = this._markerService.read({
|
|
77
|
+
const marker = this._markerService.read({
|
|
78
|
+
resource: cell.uri,
|
|
79
|
+
severities: MarkerSeverity.Error | MarkerSeverity.Warning
|
|
80
|
+
});
|
|
78
81
|
marker.forEach(m => {
|
|
79
82
|
const color = m.severity === MarkerSeverity.Error ? editorErrorForeground : editorWarningForeground;
|
|
80
|
-
const range = {
|
|
83
|
+
const range = {
|
|
84
|
+
startLineNumber: m.startLineNumber,
|
|
85
|
+
startColumn: m.startColumn,
|
|
86
|
+
endLineNumber: m.endLineNumber,
|
|
87
|
+
endColumn: m.endColumn
|
|
88
|
+
};
|
|
81
89
|
cellDecorations.push({
|
|
82
90
|
handle: cell.handle,
|
|
83
91
|
options: {
|
|
@@ -94,11 +102,15 @@ let NotebookMarkerDecorationContribution = class NotebookMarkerDecorationContrib
|
|
|
94
102
|
this._markersOverviewRulerDecorations = this._notebookEditor.deltaCellDecorations(this._markersOverviewRulerDecorations, cellDecorations);
|
|
95
103
|
}
|
|
96
104
|
};
|
|
97
|
-
NotebookMarkerDecorationContribution.__decorator = ( __decorate(
|
|
98
|
-
throttle(100)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
NotebookMarkerDecorationContribution.__decorator = ( __decorate(
|
|
106
|
+
[throttle(100)],
|
|
107
|
+
NotebookMarkerDecorationContribution.prototype,
|
|
108
|
+
"_update",
|
|
109
|
+
null
|
|
110
|
+
));
|
|
111
|
+
NotebookMarkerDecorationContribution = ( __decorate([( __param(1, IMarkerService))], NotebookMarkerDecorationContribution));
|
|
103
112
|
registerWorkbenchContribution2(MarkerListProvider.ID, MarkerListProvider, WorkbenchPhase.BlockRestore);
|
|
104
|
-
registerNotebookContribution(
|
|
113
|
+
registerNotebookContribution(
|
|
114
|
+
NotebookMarkerDecorationContribution.id,
|
|
115
|
+
NotebookMarkerDecorationContribution
|
|
116
|
+
);
|