@codingame/monaco-vscode-notebook-service-override 1.85.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/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/notebook.d.ts +5 -0
- package/notebook.js +44 -0
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/package.json +32 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +387 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +668 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +109 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +319 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +173 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +485 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +106 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +165 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +238 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +72 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +168 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +317 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +209 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +87 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +82 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +93 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +383 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +46 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +135 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +383 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +117 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +511 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +168 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +57 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +94 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +702 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +268 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +45 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1297 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +284 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +563 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +108 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +313 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +872 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +393 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +175 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +1121 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +159 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +339 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl.js +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +182 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +106 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +509 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +133 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +342 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +111 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +666 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +200 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +80 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +1001 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +103 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +202 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +80 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +98 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +217 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +89 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +372 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +706 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +407 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +144 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +129 -0
- package/worker.js +1 -0
- package/workers/notebook.worker.js +9 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { registerAction2, Action2, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
4
|
+
import { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
5
|
+
import { ContextKeyExpr } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
6
|
+
import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
|
|
7
|
+
import { NOTEBOOK_ACTIONS_CATEGORY } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
8
|
+
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
9
|
+
import { INotebookEditorService } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService';
|
|
10
|
+
import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
11
|
+
import { NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_EDITOR_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
12
|
+
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
|
|
13
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
14
|
+
import { IPreferencesService } from 'vscode/vscode/vs/workbench/services/preferences/common/preferences';
|
|
15
|
+
|
|
16
|
+
registerAction2(class NotebookConfigureLayoutAction extends Action2 {
|
|
17
|
+
constructor() {
|
|
18
|
+
super({
|
|
19
|
+
id: 'workbench.notebook.layout.select',
|
|
20
|
+
title: {
|
|
21
|
+
value: ( localizeWithPath(
|
|
22
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
23
|
+
'workbench.notebook.layout.select.label',
|
|
24
|
+
"Select between Notebook Layouts"
|
|
25
|
+
)),
|
|
26
|
+
original: 'Select between Notebook Layouts'
|
|
27
|
+
},
|
|
28
|
+
f1: true,
|
|
29
|
+
precondition: ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)),
|
|
30
|
+
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
31
|
+
menu: [
|
|
32
|
+
{
|
|
33
|
+
id: MenuId.EditorTitle,
|
|
34
|
+
group: 'notebookLayout',
|
|
35
|
+
when: ( ContextKeyExpr.and(NOTEBOOK_IS_ACTIVE_EDITOR, ( ContextKeyExpr.notEquals('config.notebook.globalToolbar', true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)))),
|
|
36
|
+
order: 0
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: MenuId.NotebookToolbar,
|
|
40
|
+
group: 'notebookLayout',
|
|
41
|
+
when: ( ContextKeyExpr.and(( ContextKeyExpr.equals('config.notebook.globalToolbar', true)), ( ContextKeyExpr.equals(`config.${NotebookSetting.openGettingStarted}`, true)))),
|
|
42
|
+
order: 0
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
run(accessor) {
|
|
48
|
+
accessor.get(ICommandService).executeCommand('workbench.action.openWalkthrough', { category: 'notebooks', step: 'notebookProfile' }, true);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
registerAction2(class NotebookConfigureLayoutAction extends Action2 {
|
|
52
|
+
constructor() {
|
|
53
|
+
super({
|
|
54
|
+
id: 'workbench.notebook.layout.configure',
|
|
55
|
+
title: {
|
|
56
|
+
value: ( localizeWithPath(
|
|
57
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
58
|
+
'workbench.notebook.layout.configure.label',
|
|
59
|
+
"Customize Notebook Layout"
|
|
60
|
+
)),
|
|
61
|
+
original: 'Customize Notebook Layout'
|
|
62
|
+
},
|
|
63
|
+
f1: true,
|
|
64
|
+
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
65
|
+
menu: [
|
|
66
|
+
{
|
|
67
|
+
id: MenuId.NotebookToolbar,
|
|
68
|
+
group: 'notebookLayout',
|
|
69
|
+
when: ( ContextKeyExpr.equals('config.notebook.globalToolbar', true)),
|
|
70
|
+
order: 1
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
run(accessor) {
|
|
76
|
+
accessor.get(IPreferencesService).openSettings({ jsonEditor: false, query: '@tag:notebookLayout' });
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
registerAction2(class NotebookConfigureLayoutFromEditorTitle extends Action2 {
|
|
80
|
+
constructor() {
|
|
81
|
+
super({
|
|
82
|
+
id: 'workbench.notebook.layout.configure.editorTitle',
|
|
83
|
+
title: {
|
|
84
|
+
value: ( localizeWithPath(
|
|
85
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
86
|
+
'workbench.notebook.layout.configure.label',
|
|
87
|
+
"Customize Notebook Layout"
|
|
88
|
+
)),
|
|
89
|
+
original: 'Customize Notebook Layout'
|
|
90
|
+
},
|
|
91
|
+
f1: false,
|
|
92
|
+
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
93
|
+
menu: [
|
|
94
|
+
{
|
|
95
|
+
id: MenuId.NotebookEditorLayoutConfigure,
|
|
96
|
+
group: 'notebookLayout',
|
|
97
|
+
when: NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
98
|
+
order: 1
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
run(accessor) {
|
|
104
|
+
accessor.get(IPreferencesService).openSettings({ jsonEditor: false, query: '@tag:notebookLayout' });
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
registerAction2(class ToggleLineNumberFromEditorTitle extends Action2 {
|
|
108
|
+
constructor() {
|
|
109
|
+
super({
|
|
110
|
+
id: 'notebook.toggleLineNumbersFromEditorTitle',
|
|
111
|
+
title: { value: ( localizeWithPath(
|
|
112
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
113
|
+
'notebook.toggleLineNumbers',
|
|
114
|
+
"Toggle Notebook Line Numbers"
|
|
115
|
+
)), original: 'Toggle Notebook Line Numbers' },
|
|
116
|
+
precondition: NOTEBOOK_EDITOR_FOCUSED,
|
|
117
|
+
menu: [
|
|
118
|
+
{
|
|
119
|
+
id: MenuId.NotebookEditorLayoutConfigure,
|
|
120
|
+
group: 'notebookLayoutDetails',
|
|
121
|
+
order: 1,
|
|
122
|
+
when: NOTEBOOK_IS_ACTIVE_EDITOR
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
126
|
+
f1: true,
|
|
127
|
+
toggled: {
|
|
128
|
+
condition: ( ContextKeyExpr.notEquals('config.notebook.lineNumbers', 'off')),
|
|
129
|
+
title: ( localizeWithPath(
|
|
130
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
131
|
+
'notebook.showLineNumbers',
|
|
132
|
+
"Notebook Line Numbers"
|
|
133
|
+
)),
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
async run(accessor) {
|
|
138
|
+
return accessor.get(ICommandService).executeCommand('notebook.toggleLineNumbers');
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
registerAction2(class ToggleCellToolbarPositionFromEditorTitle extends Action2 {
|
|
142
|
+
constructor() {
|
|
143
|
+
super({
|
|
144
|
+
id: 'notebook.toggleCellToolbarPositionFromEditorTitle',
|
|
145
|
+
title: { value: ( localizeWithPath(
|
|
146
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
147
|
+
'notebook.toggleCellToolbarPosition',
|
|
148
|
+
"Toggle Cell Toolbar Position"
|
|
149
|
+
)), original: 'Toggle Cell Toolbar Position' },
|
|
150
|
+
menu: [{
|
|
151
|
+
id: MenuId.NotebookEditorLayoutConfigure,
|
|
152
|
+
group: 'notebookLayoutDetails',
|
|
153
|
+
order: 3
|
|
154
|
+
}],
|
|
155
|
+
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
156
|
+
f1: false
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
async run(accessor, ...args) {
|
|
160
|
+
return accessor.get(ICommandService).executeCommand('notebook.toggleCellToolbarPosition', ...args);
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
registerAction2(class ToggleBreadcrumbFromEditorTitle extends Action2 {
|
|
164
|
+
constructor() {
|
|
165
|
+
super({
|
|
166
|
+
id: 'breadcrumbs.toggleFromEditorTitle',
|
|
167
|
+
title: { value: ( localizeWithPath(
|
|
168
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
169
|
+
'notebook.toggleBreadcrumb',
|
|
170
|
+
"Toggle Breadcrumbs"
|
|
171
|
+
)), original: 'Toggle Breadcrumbs' },
|
|
172
|
+
menu: [{
|
|
173
|
+
id: MenuId.NotebookEditorLayoutConfigure,
|
|
174
|
+
group: 'notebookLayoutDetails',
|
|
175
|
+
order: 2
|
|
176
|
+
}],
|
|
177
|
+
f1: false
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
async run(accessor) {
|
|
181
|
+
return accessor.get(ICommandService).executeCommand('breadcrumbs.toggle');
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
registerAction2(class SaveMimeTypeDisplayOrder extends Action2 {
|
|
185
|
+
constructor() {
|
|
186
|
+
super({
|
|
187
|
+
id: 'notebook.saveMimeTypeOrder',
|
|
188
|
+
title: {
|
|
189
|
+
value: ( localizeWithPath(
|
|
190
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
191
|
+
'notebook.saveMimeTypeOrder',
|
|
192
|
+
'Save Mimetype Display Order'
|
|
193
|
+
)),
|
|
194
|
+
original: 'Save Mimetype Display Order'
|
|
195
|
+
},
|
|
196
|
+
f1: true,
|
|
197
|
+
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
198
|
+
precondition: NOTEBOOK_IS_ACTIVE_EDITOR,
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
run(accessor) {
|
|
202
|
+
const service = accessor.get(INotebookService);
|
|
203
|
+
const qp = accessor.get(IQuickInputService).createQuickPick();
|
|
204
|
+
qp.placeholder = ( localizeWithPath(
|
|
205
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
206
|
+
'notebook.placeholder',
|
|
207
|
+
'Settings file to save in'
|
|
208
|
+
));
|
|
209
|
+
qp.items = [
|
|
210
|
+
{ target: 2 , label: ( localizeWithPath(
|
|
211
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
212
|
+
'saveTarget.machine',
|
|
213
|
+
'User Settings'
|
|
214
|
+
)) },
|
|
215
|
+
{ target: 5 , label: ( localizeWithPath(
|
|
216
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
217
|
+
'saveTarget.workspace',
|
|
218
|
+
'Workspace Settings'
|
|
219
|
+
)) },
|
|
220
|
+
];
|
|
221
|
+
qp.onDidAccept(() => {
|
|
222
|
+
const target = qp.selectedItems[0]?.target;
|
|
223
|
+
if (target !== undefined) {
|
|
224
|
+
service.saveMimeDisplayOrder(target);
|
|
225
|
+
}
|
|
226
|
+
qp.dispose();
|
|
227
|
+
});
|
|
228
|
+
qp.onDidHide(() => qp.dispose());
|
|
229
|
+
qp.show();
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
registerAction2(class NotebookWebviewResetAction extends Action2 {
|
|
233
|
+
constructor() {
|
|
234
|
+
super({
|
|
235
|
+
id: 'workbench.notebook.layout.webview.reset',
|
|
236
|
+
title: {
|
|
237
|
+
value: ( localizeWithPath(
|
|
238
|
+
'vs/workbench/contrib/notebook/browser/controller/layoutActions',
|
|
239
|
+
'workbench.notebook.layout.webview.reset.label',
|
|
240
|
+
"Reset Notebook Webview"
|
|
241
|
+
)),
|
|
242
|
+
original: 'Reset Notebook Webview'
|
|
243
|
+
},
|
|
244
|
+
f1: false,
|
|
245
|
+
category: NOTEBOOK_ACTIONS_CATEGORY
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
run(accessor, args) {
|
|
249
|
+
const editorService = accessor.get(IEditorService);
|
|
250
|
+
if (args) {
|
|
251
|
+
const uri = URI.revive(args);
|
|
252
|
+
const notebookEditorService = accessor.get(INotebookEditorService);
|
|
253
|
+
const widgets = notebookEditorService.listNotebookEditors().filter(widget => widget.hasModel() && ( widget.textModel.uri.toString()) === ( uri.toString()));
|
|
254
|
+
for (const widget of widgets) {
|
|
255
|
+
if (widget.hasModel()) {
|
|
256
|
+
widget.getInnerWebview()?.reload();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane);
|
|
262
|
+
if (!editor) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
editor.getInnerWebview()?.reload();
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const fixedEditorPadding = {
|
|
2
|
+
top: 12,
|
|
3
|
+
bottom: 12
|
|
4
|
+
};
|
|
5
|
+
const fixedEditorOptions = {
|
|
6
|
+
padding: fixedEditorPadding,
|
|
7
|
+
scrollBeyondLastLine: false,
|
|
8
|
+
scrollbar: {
|
|
9
|
+
verticalScrollbarSize: 14,
|
|
10
|
+
horizontal: 'auto',
|
|
11
|
+
vertical: 'auto',
|
|
12
|
+
useShadows: true,
|
|
13
|
+
verticalHasArrows: false,
|
|
14
|
+
horizontalHasArrows: false,
|
|
15
|
+
alwaysConsumeMouseWheel: false,
|
|
16
|
+
},
|
|
17
|
+
renderLineHighlightOnlyWhenFocus: true,
|
|
18
|
+
overviewRulerLanes: 0,
|
|
19
|
+
overviewRulerBorder: false,
|
|
20
|
+
selectOnLineNumbers: false,
|
|
21
|
+
wordWrap: 'off',
|
|
22
|
+
lineNumbers: 'off',
|
|
23
|
+
lineDecorationsWidth: 0,
|
|
24
|
+
glyphMargin: false,
|
|
25
|
+
fixedOverflowWidgets: true,
|
|
26
|
+
minimap: { enabled: false },
|
|
27
|
+
renderValidationDecorations: 'on',
|
|
28
|
+
renderLineHighlight: 'none',
|
|
29
|
+
readOnly: true
|
|
30
|
+
};
|
|
31
|
+
const fixedDiffEditorOptions = {
|
|
32
|
+
...fixedEditorOptions,
|
|
33
|
+
glyphMargin: true,
|
|
34
|
+
enableSplitViewResizing: false,
|
|
35
|
+
renderIndicators: true,
|
|
36
|
+
renderMarginRevertIcon: false,
|
|
37
|
+
readOnly: false,
|
|
38
|
+
isInEmbeddedEditor: true,
|
|
39
|
+
renderOverviewRuler: false,
|
|
40
|
+
wordWrap: 'off',
|
|
41
|
+
diffWordWrap: 'off',
|
|
42
|
+
diffAlgorithm: 'advanced',
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { fixedDiffEditorOptions, fixedEditorOptions, fixedEditorPadding };
|