@codingame/monaco-vscode-notebook-service-override 3.2.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/notebook.js +13 -13
- package/package.json +2 -2
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
- package/external/tslib/tslib.es6.js +0 -11
- package/override/vs/platform/dialogs/common/dialogs.js +0 -8
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +0 -389
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +0 -608
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +0 -109
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +0 -173
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +0 -488
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +0 -106
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +0 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +0 -165
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +0 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +0 -320
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +0 -72
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +0 -168
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +0 -209
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +0 -84
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +0 -82
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +0 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +0 -91
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +0 -393
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +0 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +0 -97
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +0 -118
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +0 -59
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +0 -148
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +0 -383
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +0 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +0 -511
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +0 -159
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +0 -56
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +0 -94
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +0 -51
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +0 -565
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +0 -31
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +0 -744
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +0 -707
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +0 -351
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +0 -267
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +0 -45
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +0 -1297
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +0 -284
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +0 -563
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +0 -108
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +0 -39
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css.js +0 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +0 -313
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +0 -890
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +0 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +0 -393
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +0 -175
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +0 -1174
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -159
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +0 -451
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +0 -192
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +0 -106
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +0 -509
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +0 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +0 -341
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +0 -111
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +0 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +0 -65
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +0 -641
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +0 -200
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +0 -1003
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +0 -103
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +0 -202
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +0 -80
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +0 -98
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService.js +0 -237
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +0 -89
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +0 -376
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +0 -408
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +0 -144
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +0 -129
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
3
|
-
import { MarkerList, IMarkerNavigationService } from 'vscode/vscode/vs/editor/contrib/gotoError/browser/markerNavigationService';
|
|
4
|
-
import { CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
5
|
-
import { MarkerSeverity, IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
6
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
7
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
8
|
-
import { NotebookOverviewRulerLane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
9
|
-
import { registerNotebookContribution } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
10
|
-
import { throttle } from 'vscode/vscode/vs/base/common/decorators';
|
|
11
|
-
import { editorErrorForeground, editorWarningForeground } from 'vscode/vscode/vs/platform/theme/common/colorRegistry';
|
|
12
|
-
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
13
|
-
|
|
14
|
-
let MarkerListProvider = class MarkerListProvider {
|
|
15
|
-
static { this.ID = 'workbench.contrib.markerListProvider'; }
|
|
16
|
-
constructor(_markerService, markerNavigation, _configService) {
|
|
17
|
-
this._markerService = _markerService;
|
|
18
|
-
this._configService = _configService;
|
|
19
|
-
this._dispoables = markerNavigation.registerProvider(this);
|
|
20
|
-
}
|
|
21
|
-
dispose() {
|
|
22
|
-
this._dispoables.dispose();
|
|
23
|
-
}
|
|
24
|
-
getMarkerList(resource) {
|
|
25
|
-
if (!resource) {
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
const data = CellUri.parse(resource);
|
|
29
|
-
if (!data) {
|
|
30
|
-
return undefined;
|
|
31
|
-
}
|
|
32
|
-
return ( new MarkerList(uri => {
|
|
33
|
-
const otherData = CellUri.parse(uri);
|
|
34
|
-
return otherData?.notebook.toString() === ( data.notebook.toString());
|
|
35
|
-
}, this._markerService, this._configService));
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
MarkerListProvider = ( __decorate([
|
|
39
|
-
( __param(0, IMarkerService)),
|
|
40
|
-
( __param(1, IMarkerNavigationService)),
|
|
41
|
-
( __param(2, IConfigurationService))
|
|
42
|
-
], MarkerListProvider));
|
|
43
|
-
let NotebookMarkerDecorationContribution = class NotebookMarkerDecorationContribution extends Disposable {
|
|
44
|
-
static { this.id = 'workbench.notebook.markerDecoration'; }
|
|
45
|
-
constructor(_notebookEditor, _markerService) {
|
|
46
|
-
super();
|
|
47
|
-
this._notebookEditor = _notebookEditor;
|
|
48
|
-
this._markerService = _markerService;
|
|
49
|
-
this._markersOverviewRulerDecorations = [];
|
|
50
|
-
this._update();
|
|
51
|
-
this._register(this._notebookEditor.onDidChangeModel(() => this._update()));
|
|
52
|
-
this._register(this._markerService.onMarkerChanged(e => {
|
|
53
|
-
if (( e.some(uri => ( this._notebookEditor.getCellsInRange().some(cell => isEqual(cell.uri, uri)))))) {
|
|
54
|
-
this._update();
|
|
55
|
-
}
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
_update() {
|
|
59
|
-
if (!this._notebookEditor.hasModel()) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const cellDecorations = [];
|
|
63
|
-
this._notebookEditor.getCellsInRange().forEach(cell => {
|
|
64
|
-
const marker = this._markerService.read({ resource: cell.uri, severities: MarkerSeverity.Error | MarkerSeverity.Warning });
|
|
65
|
-
marker.forEach(m => {
|
|
66
|
-
const color = m.severity === MarkerSeverity.Error ? editorErrorForeground : editorWarningForeground;
|
|
67
|
-
const range = { startLineNumber: m.startLineNumber, startColumn: m.startColumn, endLineNumber: m.endLineNumber, endColumn: m.endColumn };
|
|
68
|
-
cellDecorations.push({
|
|
69
|
-
handle: cell.handle,
|
|
70
|
-
options: {
|
|
71
|
-
overviewRuler: {
|
|
72
|
-
color: color,
|
|
73
|
-
modelRanges: [range],
|
|
74
|
-
includeOutput: false,
|
|
75
|
-
position: NotebookOverviewRulerLane.Right
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
this._markersOverviewRulerDecorations = this._notebookEditor.deltaCellDecorations(this._markersOverviewRulerDecorations, cellDecorations);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
NotebookMarkerDecorationContribution.__decorator = ( __decorate([
|
|
85
|
-
throttle(100)
|
|
86
|
-
], NotebookMarkerDecorationContribution.prototype, "_update", null));
|
|
87
|
-
NotebookMarkerDecorationContribution = ( __decorate([
|
|
88
|
-
( __param(1, IMarkerService))
|
|
89
|
-
], NotebookMarkerDecorationContribution));
|
|
90
|
-
registerWorkbenchContribution2(MarkerListProvider.ID, MarkerListProvider, 2 );
|
|
91
|
-
registerNotebookContribution(NotebookMarkerDecorationContribution.id, NotebookMarkerDecorationContribution);
|
|
@@ -1,393 +0,0 @@
|
|
|
1
|
-
import { timeout } from 'vscode/vscode/vs/base/common/async';
|
|
2
|
-
import { EditorExtensionsRegistry } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
3
|
-
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
4
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
5
|
-
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vscode/vscode/vs/platform/accessibility/common/accessibility';
|
|
6
|
-
import { registerAction2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
7
|
-
import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
8
|
-
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
9
|
-
import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
10
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
11
|
-
import { InlineChatController } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
12
|
-
import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from '../../controller/chat/notebookChatContext.js';
|
|
13
|
-
import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
14
|
-
import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
15
|
-
import { NOTEBOOK_EDITOR_CURSOR_BOUNDARY, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
16
|
-
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
17
|
-
|
|
18
|
-
const NOTEBOOK_FOCUS_TOP = 'notebook.focusTop';
|
|
19
|
-
const NOTEBOOK_FOCUS_BOTTOM = 'notebook.focusBottom';
|
|
20
|
-
const NOTEBOOK_FOCUS_PREVIOUS_EDITOR = 'notebook.focusPreviousEditor';
|
|
21
|
-
const NOTEBOOK_FOCUS_NEXT_EDITOR = 'notebook.focusNextEditor';
|
|
22
|
-
const FOCUS_IN_OUTPUT_COMMAND_ID = 'notebook.cell.focusInOutput';
|
|
23
|
-
const FOCUS_OUT_OUTPUT_COMMAND_ID = 'notebook.cell.focusOutOutput';
|
|
24
|
-
const CENTER_ACTIVE_CELL = 'notebook.centerActiveCell';
|
|
25
|
-
const NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID = 'notebook.cell.cursorPageUp';
|
|
26
|
-
const NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID = 'notebook.cell.cursorPageUpSelect';
|
|
27
|
-
const NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID = 'notebook.cell.cursorPageDown';
|
|
28
|
-
const NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID = 'notebook.cell.cursorPageDownSelect';
|
|
29
|
-
registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
30
|
-
constructor() {
|
|
31
|
-
super({
|
|
32
|
-
id: NOTEBOOK_FOCUS_NEXT_EDITOR,
|
|
33
|
-
title: ( localizeWithPath(
|
|
34
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
35
|
-
'cursorMoveDown',
|
|
36
|
-
'Focus Next Cell Editor'
|
|
37
|
-
)),
|
|
38
|
-
keybinding: [
|
|
39
|
-
{
|
|
40
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
41
|
-
primary: 18 ,
|
|
42
|
-
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo('markup')), ( NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)), NOTEBOOK_CURSOR_NAVIGATION_MODE)), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
46
|
-
primary: 18 ,
|
|
47
|
-
weight: 200 ,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
|
|
51
|
-
primary: 2048 | 18 ,
|
|
52
|
-
mac: { primary: 256 | 2048 | 18 , },
|
|
53
|
-
weight: 200
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
57
|
-
primary: 2048 | 512 | 12 ,
|
|
58
|
-
mac: { primary: 2048 | 512 | 12 , },
|
|
59
|
-
weight: 200
|
|
60
|
-
},
|
|
61
|
-
]
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
async runWithContext(accessor, context) {
|
|
65
|
-
const editor = context.notebookEditor;
|
|
66
|
-
const activeCell = context.cell;
|
|
67
|
-
const idx = editor.getCellIndex(activeCell);
|
|
68
|
-
if (typeof idx !== 'number') {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (idx >= editor.getLength() - 1) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const focusEditorLine = activeCell.textBuffer.getLineCount();
|
|
75
|
-
const targetCell = (context.cell ?? context.selectedCells?.[0]);
|
|
76
|
-
const foundEditor = targetCell ? findTargetCellEditor(context, targetCell) : undefined;
|
|
77
|
-
if (foundEditor && foundEditor.hasTextFocus() && InlineChatController.get(foundEditor)?.getWidgetPosition()?.lineNumber === focusEditorLine) {
|
|
78
|
-
InlineChatController.get(foundEditor)?.focus();
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
const newCell = editor.cellAt(idx + 1);
|
|
82
|
-
const newFocusMode = newCell.cellKind === CellKind.Markup && newCell.getEditState() === CellEditState.Preview ? 'container' : 'editor';
|
|
83
|
-
await editor.focusNotebookCell(newCell, newFocusMode, { focusEditorLine: 1 });
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
88
|
-
constructor() {
|
|
89
|
-
super({
|
|
90
|
-
id: NOTEBOOK_FOCUS_PREVIOUS_EDITOR,
|
|
91
|
-
title: ( localizeWithPath(
|
|
92
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
93
|
-
'cursorMoveUp',
|
|
94
|
-
'Focus Previous Cell Editor'
|
|
95
|
-
)),
|
|
96
|
-
keybinding: [
|
|
97
|
-
{
|
|
98
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus, ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')), ( NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none')))), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
99
|
-
primary: 16 ,
|
|
100
|
-
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()), ( ContextKeyExpr.equals('config.notebook.navigation.allowNavigateToSurroundingCells', true)), ( ContextKeyExpr.and(( NOTEBOOK_CELL_TYPE.isEqualTo('markup')), ( NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(false)), NOTEBOOK_CURSOR_NAVIGATION_MODE)), ( EditorContextKeys.isEmbeddedDiffEditor.negate()))),
|
|
104
|
-
primary: 16 ,
|
|
105
|
-
weight: 200 ,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
109
|
-
primary: 2048 | 512 | 11 ,
|
|
110
|
-
mac: { primary: 2048 | 512 | 11 },
|
|
111
|
-
weight: 200
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
async runWithContext(accessor, context) {
|
|
117
|
-
const editor = context.notebookEditor;
|
|
118
|
-
const activeCell = context.cell;
|
|
119
|
-
const idx = editor.getCellIndex(activeCell);
|
|
120
|
-
if (typeof idx !== 'number') {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
if (idx < 1 || editor.getLength() === 0) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const newCell = editor.cellAt(idx - 1);
|
|
127
|
-
const newFocusMode = newCell.cellKind === CellKind.Markup && newCell.getEditState() === CellEditState.Preview ? 'container' : 'editor';
|
|
128
|
-
const focusEditorLine = newCell.textBuffer.getLineCount();
|
|
129
|
-
await editor.focusNotebookCell(newCell, newFocusMode, { focusEditorLine: focusEditorLine });
|
|
130
|
-
const foundEditor = findTargetCellEditor(context, newCell);
|
|
131
|
-
if (foundEditor && InlineChatController.get(foundEditor)?.getWidgetPosition()?.lineNumber === focusEditorLine) {
|
|
132
|
-
InlineChatController.get(foundEditor)?.focus();
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
registerAction2(class extends NotebookAction {
|
|
137
|
-
constructor() {
|
|
138
|
-
super({
|
|
139
|
-
id: NOTEBOOK_FOCUS_TOP,
|
|
140
|
-
title: ( localizeWithPath(
|
|
141
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
142
|
-
'focusFirstCell',
|
|
143
|
-
'Focus First Cell'
|
|
144
|
-
)),
|
|
145
|
-
keybinding: [
|
|
146
|
-
{
|
|
147
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
148
|
-
primary: 2048 | 14 ,
|
|
149
|
-
weight: 200
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
when: ( ContextKeyExpr.and(
|
|
153
|
-
NOTEBOOK_EDITOR_FOCUSED,
|
|
154
|
-
ContextKeyExpr.not(InputFocusedContextKey),
|
|
155
|
-
( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
156
|
-
)),
|
|
157
|
-
mac: { primary: 2048 | 16 },
|
|
158
|
-
weight: 200
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
async runWithContext(accessor, context) {
|
|
164
|
-
const editor = context.notebookEditor;
|
|
165
|
-
if (editor.getLength() === 0) {
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
const firstCell = editor.cellAt(0);
|
|
169
|
-
await editor.focusNotebookCell(firstCell, 'container');
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
registerAction2(class extends NotebookAction {
|
|
173
|
-
constructor() {
|
|
174
|
-
super({
|
|
175
|
-
id: NOTEBOOK_FOCUS_BOTTOM,
|
|
176
|
-
title: ( localizeWithPath(
|
|
177
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
178
|
-
'focusLastCell',
|
|
179
|
-
'Focus Last Cell'
|
|
180
|
-
)),
|
|
181
|
-
keybinding: [
|
|
182
|
-
{
|
|
183
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
184
|
-
primary: 2048 | 13 ,
|
|
185
|
-
mac: undefined,
|
|
186
|
-
weight: 200
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
when: ( ContextKeyExpr.and(
|
|
190
|
-
NOTEBOOK_EDITOR_FOCUSED,
|
|
191
|
-
ContextKeyExpr.not(InputFocusedContextKey),
|
|
192
|
-
( CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo(''))
|
|
193
|
-
)),
|
|
194
|
-
mac: { primary: 2048 | 18 },
|
|
195
|
-
weight: 200
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
async runWithContext(accessor, context) {
|
|
201
|
-
const editor = context.notebookEditor;
|
|
202
|
-
if (!editor.hasModel() || editor.getLength() === 0) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const lastIdx = editor.getLength() - 1;
|
|
206
|
-
const lastVisibleIdx = editor.getPreviousVisibleCellIndex(lastIdx);
|
|
207
|
-
if (lastVisibleIdx) {
|
|
208
|
-
const cell = editor.cellAt(lastVisibleIdx);
|
|
209
|
-
await editor.focusNotebookCell(cell, 'container');
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
registerAction2(class extends NotebookCellAction {
|
|
214
|
-
constructor() {
|
|
215
|
-
super({
|
|
216
|
-
id: FOCUS_IN_OUTPUT_COMMAND_ID,
|
|
217
|
-
title: ( localizeWithPath(
|
|
218
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
219
|
-
'focusOutput',
|
|
220
|
-
'Focus In Active Cell Output'
|
|
221
|
-
)),
|
|
222
|
-
keybinding: {
|
|
223
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS)),
|
|
224
|
-
primary: 2048 | 18 ,
|
|
225
|
-
mac: { primary: 256 | 2048 | 18 , },
|
|
226
|
-
weight: 200
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
async runWithContext(accessor, context) {
|
|
231
|
-
const editor = context.notebookEditor;
|
|
232
|
-
const activeCell = context.cell;
|
|
233
|
-
return timeout(0).then(() => editor.focusNotebookCell(activeCell, 'output'));
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
registerAction2(class extends NotebookCellAction {
|
|
237
|
-
constructor() {
|
|
238
|
-
super({
|
|
239
|
-
id: FOCUS_OUT_OUTPUT_COMMAND_ID,
|
|
240
|
-
title: ( localizeWithPath(
|
|
241
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
242
|
-
'focusOutputOut',
|
|
243
|
-
'Focus Out Active Cell Output'
|
|
244
|
-
)),
|
|
245
|
-
keybinding: {
|
|
246
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
|
|
247
|
-
primary: 2048 | 16 ,
|
|
248
|
-
mac: { primary: 256 | 2048 | 16 , },
|
|
249
|
-
weight: 200
|
|
250
|
-
},
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
async runWithContext(accessor, context) {
|
|
254
|
-
const editor = context.notebookEditor;
|
|
255
|
-
const activeCell = context.cell;
|
|
256
|
-
await editor.focusNotebookCell(activeCell, 'editor');
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
registerAction2(class CenterActiveCellAction extends NotebookCellAction {
|
|
260
|
-
constructor() {
|
|
261
|
-
super({
|
|
262
|
-
id: CENTER_ACTIVE_CELL,
|
|
263
|
-
title: ( localizeWithPath(
|
|
264
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
265
|
-
'notebookActions.centerActiveCell',
|
|
266
|
-
"Center Active Cell"
|
|
267
|
-
)),
|
|
268
|
-
keybinding: {
|
|
269
|
-
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
270
|
-
primary: 2048 | 42 ,
|
|
271
|
-
mac: {
|
|
272
|
-
primary: 256 | 42 ,
|
|
273
|
-
},
|
|
274
|
-
weight: 200
|
|
275
|
-
},
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
async runWithContext(accessor, context) {
|
|
279
|
-
return context.notebookEditor.revealInCenter(context.cell);
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
registerAction2(class extends NotebookCellAction {
|
|
283
|
-
constructor() {
|
|
284
|
-
super({
|
|
285
|
-
id: NOTEBOOK_CURSOR_PAGEUP_COMMAND_ID,
|
|
286
|
-
title: ( localizeWithPath(
|
|
287
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
288
|
-
'cursorPageUp',
|
|
289
|
-
"Cell Cursor Page Up"
|
|
290
|
-
)),
|
|
291
|
-
keybinding: [
|
|
292
|
-
{
|
|
293
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
294
|
-
primary: 11 ,
|
|
295
|
-
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
296
|
-
}
|
|
297
|
-
]
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
async runWithContext(accessor, context) {
|
|
301
|
-
EditorExtensionsRegistry.getEditorCommand('cursorPageUp').runCommand(accessor, { pageSize: getPageSize(context) });
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
registerAction2(class extends NotebookCellAction {
|
|
305
|
-
constructor() {
|
|
306
|
-
super({
|
|
307
|
-
id: NOTEBOOK_CURSOR_PAGEUP_SELECT_COMMAND_ID,
|
|
308
|
-
title: ( localizeWithPath(
|
|
309
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
310
|
-
'cursorPageUpSelect',
|
|
311
|
-
"Cell Cursor Page Up Select"
|
|
312
|
-
)),
|
|
313
|
-
keybinding: [
|
|
314
|
-
{
|
|
315
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
316
|
-
primary: 1024 | 11 ,
|
|
317
|
-
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
318
|
-
}
|
|
319
|
-
]
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
async runWithContext(accessor, context) {
|
|
323
|
-
EditorExtensionsRegistry.getEditorCommand('cursorPageUpSelect').runCommand(accessor, { pageSize: getPageSize(context) });
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
registerAction2(class extends NotebookCellAction {
|
|
327
|
-
constructor() {
|
|
328
|
-
super({
|
|
329
|
-
id: NOTEBOOK_CURSOR_PAGEDOWN_COMMAND_ID,
|
|
330
|
-
title: ( localizeWithPath(
|
|
331
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
332
|
-
'cursorPageDown',
|
|
333
|
-
"Cell Cursor Page Down"
|
|
334
|
-
)),
|
|
335
|
-
keybinding: [
|
|
336
|
-
{
|
|
337
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
338
|
-
primary: 12 ,
|
|
339
|
-
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
340
|
-
}
|
|
341
|
-
]
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
async runWithContext(accessor, context) {
|
|
345
|
-
EditorExtensionsRegistry.getEditorCommand('cursorPageDown').runCommand(accessor, { pageSize: getPageSize(context) });
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
registerAction2(class extends NotebookCellAction {
|
|
349
|
-
constructor() {
|
|
350
|
-
super({
|
|
351
|
-
id: NOTEBOOK_CURSOR_PAGEDOWN_SELECT_COMMAND_ID,
|
|
352
|
-
title: ( localizeWithPath(
|
|
353
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
354
|
-
'cursorPageDownSelect',
|
|
355
|
-
"Cell Cursor Page Down Select"
|
|
356
|
-
)),
|
|
357
|
-
keybinding: [
|
|
358
|
-
{
|
|
359
|
-
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ( ContextKeyExpr.has(InputFocusedContextKey)), EditorContextKeys.editorTextFocus)),
|
|
360
|
-
primary: 1024 | 12 ,
|
|
361
|
-
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
362
|
-
}
|
|
363
|
-
]
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
async runWithContext(accessor, context) {
|
|
367
|
-
EditorExtensionsRegistry.getEditorCommand('cursorPageDownSelect').runCommand(accessor, { pageSize: getPageSize(context) });
|
|
368
|
-
}
|
|
369
|
-
});
|
|
370
|
-
function getPageSize(context) {
|
|
371
|
-
const editor = context.notebookEditor;
|
|
372
|
-
const layoutInfo = editor.getViewModel().layoutInfo;
|
|
373
|
-
const lineHeight = layoutInfo?.fontInfo.lineHeight || 17;
|
|
374
|
-
return Math.max(1, Math.floor((layoutInfo?.height || 0) / lineHeight) - 2);
|
|
375
|
-
}
|
|
376
|
-
( Registry.as(Extensions.Configuration)).registerConfiguration({
|
|
377
|
-
id: 'notebook',
|
|
378
|
-
order: 100,
|
|
379
|
-
type: 'object',
|
|
380
|
-
'properties': {
|
|
381
|
-
'notebook.navigation.allowNavigateToSurroundingCells': {
|
|
382
|
-
type: 'boolean',
|
|
383
|
-
default: true,
|
|
384
|
-
markdownDescription: ( localizeWithPath(
|
|
385
|
-
'vs/workbench/contrib/notebook/browser/contrib/navigation/arrow',
|
|
386
|
-
'notebook.navigation.allowNavigateToSurroundingCells',
|
|
387
|
-
"When enabled cursor can navigate to the next/previous cell when the current cursor in the cell editor is at the first/last line."
|
|
388
|
-
))
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
export { CENTER_ACTIVE_CELL };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
4
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
5
|
-
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
7
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
8
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
|
|
9
|
-
import { VIEWLET_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
10
|
-
import { NOTEBOOK_VARIABLE_VIEW_ENABLED } from './notebookVariableContextKeys.js';
|
|
11
|
-
import { NotebookVariablesView } from './notebookVariablesView.js';
|
|
12
|
-
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
13
|
-
import { variablesViewIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
14
|
-
import { NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
15
|
-
import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
16
|
-
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService';
|
|
17
|
-
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService';
|
|
18
|
-
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
19
|
-
|
|
20
|
-
let NotebookVariables = class NotebookVariables extends Disposable {
|
|
21
|
-
constructor(contextKeyService, configurationService, editorService, notebookExecutionStateService, notebookKernelService, notebookDocumentService) {
|
|
22
|
-
super();
|
|
23
|
-
this.configurationService = configurationService;
|
|
24
|
-
this.editorService = editorService;
|
|
25
|
-
this.notebookExecutionStateService = notebookExecutionStateService;
|
|
26
|
-
this.notebookKernelService = notebookKernelService;
|
|
27
|
-
this.notebookDocumentService = notebookDocumentService;
|
|
28
|
-
this.listeners = [];
|
|
29
|
-
this.initialized = false;
|
|
30
|
-
this.viewEnabled = NOTEBOOK_VARIABLE_VIEW_ENABLED.bindTo(contextKeyService);
|
|
31
|
-
this.listeners.push(this.editorService.onDidActiveEditorChange(() => this.handleInitEvent()));
|
|
32
|
-
this.listeners.push(this.notebookExecutionStateService.onDidChangeExecution((e) => this.handleInitEvent(e.notebook)));
|
|
33
|
-
this.configListener = configurationService.onDidChangeConfiguration((e) => this.handleConfigChange(e));
|
|
34
|
-
}
|
|
35
|
-
handleConfigChange(e) {
|
|
36
|
-
if (e.affectsConfiguration(NotebookSetting.notebookVariablesView)) {
|
|
37
|
-
if (!this.configurationService.getValue(NotebookSetting.notebookVariablesView)) {
|
|
38
|
-
this.viewEnabled.set(false);
|
|
39
|
-
}
|
|
40
|
-
else if (this.initialized) {
|
|
41
|
-
this.viewEnabled.set(true);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.handleInitEvent();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
handleInitEvent(notebook) {
|
|
49
|
-
if (this.configurationService.getValue(NotebookSetting.notebookVariablesView)
|
|
50
|
-
&& (!!notebook || this.editorService.activeEditorPane?.getId() === 'workbench.editor.notebook')) {
|
|
51
|
-
if (this.hasVariableProvider(notebook) && !this.initialized && this.initializeView()) {
|
|
52
|
-
this.viewEnabled.set(true);
|
|
53
|
-
this.initialized = true;
|
|
54
|
-
this.listeners.forEach(listener => listener.dispose());
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
hasVariableProvider(notebookUri) {
|
|
59
|
-
const notebook = notebookUri ?
|
|
60
|
-
this.notebookDocumentService.getNotebookTextModel(notebookUri) :
|
|
61
|
-
getNotebookEditorFromEditorPane(this.editorService.activeEditorPane)?.getViewModel()?.notebookDocument;
|
|
62
|
-
return notebook && this.notebookKernelService.getMatchingKernel(notebook).selected?.hasVariableProvider;
|
|
63
|
-
}
|
|
64
|
-
initializeView() {
|
|
65
|
-
const debugViewContainer = ( Registry.as('workbench.registry.view.containers')).get(VIEWLET_ID);
|
|
66
|
-
if (debugViewContainer) {
|
|
67
|
-
const viewsRegistry = ( Registry.as(Extensions.ViewsRegistry));
|
|
68
|
-
const viewDescriptor = {
|
|
69
|
-
id: 'NOTEBOOK_VARIABLES', name: ( localize2WithPath(
|
|
70
|
-
'vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables',
|
|
71
|
-
'notebookVariables',
|
|
72
|
-
"Notebook Variables"
|
|
73
|
-
)),
|
|
74
|
-
containerIcon: variablesViewIcon, ctorDescriptor: ( new SyncDescriptor(NotebookVariablesView)),
|
|
75
|
-
order: 50, weight: 5, canToggleVisibility: true, canMoveView: true, collapsed: true, when: NOTEBOOK_VARIABLE_VIEW_ENABLED,
|
|
76
|
-
};
|
|
77
|
-
viewsRegistry.registerViews([viewDescriptor], debugViewContainer);
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
dispose() {
|
|
83
|
-
super.dispose();
|
|
84
|
-
this.listeners.forEach(listener => listener.dispose());
|
|
85
|
-
this.configListener.dispose();
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
NotebookVariables = ( __decorate([
|
|
89
|
-
( __param(0, IContextKeyService)),
|
|
90
|
-
( __param(1, IConfigurationService)),
|
|
91
|
-
( __param(2, IEditorService)),
|
|
92
|
-
( __param(3, INotebookExecutionStateService)),
|
|
93
|
-
( __param(4, INotebookKernelService)),
|
|
94
|
-
( __param(5, INotebookService))
|
|
95
|
-
], NotebookVariables));
|
|
96
|
-
|
|
97
|
-
export { NotebookVariables };
|