@codingame/monaco-vscode-notebook-service-override 4.5.0 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +30 -44
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +24 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +30 -53
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +40 -84
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +9 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +35 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +94 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +25 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +71 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +97 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +7 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +128 -177
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +132 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +70 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +32 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +39 -64
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +28 -43
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +23 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +58 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +162 -264
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +33 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +58 -153
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +15 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +22 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +5 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +100 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +41 -76
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +42 -45
- package/notebook.d.ts +0 -5
|
@@ -46,6 +46,7 @@ import { registerZIndex, ZIndex } from 'vscode/vscode/vs/platform/layout/browser
|
|
|
46
46
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
47
47
|
|
|
48
48
|
var NotebookTextDiffEditor_1;
|
|
49
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor";
|
|
49
50
|
const $ = $$1;
|
|
50
51
|
class NotebookDiffEditorSelection {
|
|
51
52
|
constructor(selections) {
|
|
@@ -98,28 +99,28 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
98
99
|
this._modifiedWebview = null;
|
|
99
100
|
this._originalWebview = null;
|
|
100
101
|
this._webviewTransparentCover = null;
|
|
101
|
-
this._onMouseUp = this._register(( new Emitter()));
|
|
102
|
+
this._onMouseUp = this._register(( (new Emitter())));
|
|
102
103
|
this.onMouseUp = this._onMouseUp.event;
|
|
103
|
-
this._onDidScroll = this._register(( new Emitter()));
|
|
104
|
+
this._onDidScroll = this._register(( (new Emitter())));
|
|
104
105
|
this.onDidScroll = this._onDidScroll.event;
|
|
105
106
|
this.onDidChangeScroll = this._onDidScroll.event;
|
|
106
107
|
this._model = null;
|
|
107
|
-
this._modifiedResourceDisposableStore = this._register(( new DisposableStore()));
|
|
108
|
-
this._insetModifyQueueByOutputId = ( new SequencerByKey());
|
|
109
|
-
this._onDidDynamicOutputRendered = this._register(( new Emitter()));
|
|
108
|
+
this._modifiedResourceDisposableStore = this._register(( (new DisposableStore())));
|
|
109
|
+
this._insetModifyQueueByOutputId = ( (new SequencerByKey()));
|
|
110
|
+
this._onDidDynamicOutputRendered = this._register(( (new Emitter())));
|
|
110
111
|
this.onDidDynamicOutputRendered = this._onDidDynamicOutputRendered.event;
|
|
111
|
-
this._localStore = this._register(( new DisposableStore()));
|
|
112
|
-
this._onDidChangeSelection = this._register(( new Emitter()));
|
|
112
|
+
this._localStore = this._register(( (new DisposableStore())));
|
|
113
|
+
this._onDidChangeSelection = this._register(( (new Emitter())));
|
|
113
114
|
this.onDidChangeSelection = this._onDidChangeSelection.event;
|
|
114
115
|
this._isDisposed = false;
|
|
115
|
-
this.pendingLayouts = ( new WeakMap());
|
|
116
|
-
this._notebookOptions = ( new NotebookOptions(
|
|
116
|
+
this.pendingLayouts = ( (new WeakMap()));
|
|
117
|
+
this._notebookOptions = ( (new NotebookOptions(
|
|
117
118
|
this.window,
|
|
118
119
|
this.configurationService,
|
|
119
120
|
notebookExecutionStateService,
|
|
120
121
|
codeEditorService,
|
|
121
122
|
false
|
|
122
|
-
));
|
|
123
|
+
)));
|
|
123
124
|
this._register(this._notebookOptions);
|
|
124
125
|
this._revealFirst = true;
|
|
125
126
|
}
|
|
@@ -138,7 +139,9 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
138
139
|
}
|
|
139
140
|
getSelection() {
|
|
140
141
|
const selections = this._list.getFocus();
|
|
141
|
-
return (
|
|
142
|
+
return (
|
|
143
|
+
(new NotebookDiffEditorSelection(selections))
|
|
144
|
+
);
|
|
142
145
|
}
|
|
143
146
|
toggleNotebookCellSelection(cell) {
|
|
144
147
|
}
|
|
@@ -183,7 +186,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
183
186
|
if (!info) {
|
|
184
187
|
return;
|
|
185
188
|
}
|
|
186
|
-
diffElement.updateOutputHeight(( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified, outputIndex, outputHeight);
|
|
189
|
+
diffElement.updateOutputHeight(( (info.notebook.toString())) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified, outputIndex, outputHeight);
|
|
187
190
|
}
|
|
188
191
|
else {
|
|
189
192
|
diffElement.updateOutputHeight(diffElement.type === 'insert' ? DiffSide.Modified : DiffSide.Original, outputIndex, outputHeight);
|
|
@@ -245,11 +248,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
245
248
|
accessibilityProvider: {
|
|
246
249
|
getAriaLabel() { return null; },
|
|
247
250
|
getWidgetAriaLabel() {
|
|
248
|
-
return ( localizeWithPath(
|
|
249
|
-
'vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor',
|
|
250
|
-
'notebookTreeAriaLabel',
|
|
251
|
-
"Notebook Text Diff"
|
|
252
|
-
));
|
|
251
|
+
return ( localizeWithPath(_moduleId, 0, "Notebook Text Diff"));
|
|
253
252
|
}
|
|
254
253
|
},
|
|
255
254
|
});
|
|
@@ -336,11 +335,11 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
336
335
|
}
|
|
337
336
|
this._revealFirst = true;
|
|
338
337
|
this._modifiedResourceDisposableStore.clear();
|
|
339
|
-
this._layoutCancellationTokenSource = ( new CancellationTokenSource());
|
|
338
|
+
this._layoutCancellationTokenSource = ( (new CancellationTokenSource()));
|
|
340
339
|
this._modifiedResourceDisposableStore.add(Event.any(this._model.original.notebook.onDidChangeContent, this._model.modified.notebook.onDidChangeContent)(e => {
|
|
341
340
|
if (this._model !== null) {
|
|
342
341
|
this._layoutCancellationTokenSource?.dispose();
|
|
343
|
-
this._layoutCancellationTokenSource = ( new CancellationTokenSource());
|
|
342
|
+
this._layoutCancellationTokenSource = ( (new CancellationTokenSource()));
|
|
344
343
|
this.updateLayout(this._layoutCancellationTokenSource.token);
|
|
345
344
|
}
|
|
346
345
|
}));
|
|
@@ -366,7 +365,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
366
365
|
this._list.clear();
|
|
367
366
|
}
|
|
368
367
|
_attachModel() {
|
|
369
|
-
this._eventDispatcher = ( new NotebookDiffEditorEventDispatcher());
|
|
368
|
+
this._eventDispatcher = ( (new NotebookDiffEditorEventDispatcher()));
|
|
370
369
|
const updateInsets = () => {
|
|
371
370
|
scheduleAtNextAnimationFrame(this.window, () => {
|
|
372
371
|
if (this._isDisposed) {
|
|
@@ -518,7 +517,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
518
517
|
const originalCell = originalModel.cells[originalCellIndex + j];
|
|
519
518
|
const modifiedCell = modifiedModel.cells[modifiedCellIndex + j];
|
|
520
519
|
if (originalCell.getHashValue() === modifiedCell.getHashValue()) {
|
|
521
|
-
diffElementViewModels.push(( new SideBySideDiffElementViewModel(
|
|
520
|
+
diffElementViewModels.push(( (new SideBySideDiffElementViewModel(
|
|
522
521
|
model.modified.notebook,
|
|
523
522
|
model.original.notebook,
|
|
524
523
|
instantiationService.createInstance(DiffNestedCellViewModel, originalCell),
|
|
@@ -526,13 +525,13 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
526
525
|
'unchanged',
|
|
527
526
|
eventDispatcher,
|
|
528
527
|
initData
|
|
529
|
-
)));
|
|
528
|
+
))));
|
|
530
529
|
}
|
|
531
530
|
else {
|
|
532
531
|
if (firstChangeIndex === -1) {
|
|
533
532
|
firstChangeIndex = diffElementViewModels.length;
|
|
534
533
|
}
|
|
535
|
-
diffElementViewModels.push(( new SideBySideDiffElementViewModel(
|
|
534
|
+
diffElementViewModels.push(( (new SideBySideDiffElementViewModel(
|
|
536
535
|
model.modified.notebook,
|
|
537
536
|
model.original.notebook,
|
|
538
537
|
instantiationService.createInstance(DiffNestedCellViewModel, originalCell),
|
|
@@ -540,7 +539,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
540
539
|
'modified',
|
|
541
540
|
eventDispatcher,
|
|
542
541
|
initData
|
|
543
|
-
)));
|
|
542
|
+
))));
|
|
544
543
|
}
|
|
545
544
|
}
|
|
546
545
|
const modifiedLCS = NotebookTextDiffEditor_1.computeModifiedLCS(instantiationService, change, originalModel, modifiedModel, eventDispatcher, initData);
|
|
@@ -552,7 +551,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
552
551
|
modifiedCellIndex = change.modifiedStart + change.modifiedLength;
|
|
553
552
|
}
|
|
554
553
|
for (let i = originalCellIndex; i < originalModel.cells.length; i++) {
|
|
555
|
-
diffElementViewModels.push(( new SideBySideDiffElementViewModel(
|
|
554
|
+
diffElementViewModels.push(( (new SideBySideDiffElementViewModel(
|
|
556
555
|
model.modified.notebook,
|
|
557
556
|
model.original.notebook,
|
|
558
557
|
instantiationService.createInstance(DiffNestedCellViewModel, originalModel.cells[i]),
|
|
@@ -560,7 +559,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
560
559
|
'unchanged',
|
|
561
560
|
eventDispatcher,
|
|
562
561
|
initData
|
|
563
|
-
)));
|
|
562
|
+
))));
|
|
564
563
|
}
|
|
565
564
|
return {
|
|
566
565
|
viewModels: diffElementViewModels,
|
|
@@ -572,7 +571,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
572
571
|
const modifiedLen = Math.min(change.originalLength, change.modifiedLength);
|
|
573
572
|
for (let j = 0; j < modifiedLen; j++) {
|
|
574
573
|
const isTheSame = originalModel.cells[change.originalStart + j].equal(modifiedModel.cells[change.modifiedStart + j]);
|
|
575
|
-
result.push(( new SideBySideDiffElementViewModel(
|
|
574
|
+
result.push(( (new SideBySideDiffElementViewModel(
|
|
576
575
|
modifiedModel,
|
|
577
576
|
originalModel,
|
|
578
577
|
instantiationService.createInstance(DiffNestedCellViewModel, originalModel.cells[change.originalStart + j]),
|
|
@@ -580,10 +579,10 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
580
579
|
isTheSame ? 'unchanged' : 'modified',
|
|
581
580
|
eventDispatcher,
|
|
582
581
|
initData
|
|
583
|
-
)));
|
|
582
|
+
))));
|
|
584
583
|
}
|
|
585
584
|
for (let j = modifiedLen; j < change.originalLength; j++) {
|
|
586
|
-
result.push(( new SingleSideDiffElementViewModel(
|
|
585
|
+
result.push(( (new SingleSideDiffElementViewModel(
|
|
587
586
|
originalModel,
|
|
588
587
|
modifiedModel,
|
|
589
588
|
instantiationService.createInstance(DiffNestedCellViewModel, originalModel.cells[change.originalStart + j]),
|
|
@@ -591,10 +590,10 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
591
590
|
'delete',
|
|
592
591
|
eventDispatcher,
|
|
593
592
|
initData
|
|
594
|
-
)));
|
|
593
|
+
))));
|
|
595
594
|
}
|
|
596
595
|
for (let j = modifiedLen; j < change.modifiedLength; j++) {
|
|
597
|
-
result.push(( new SingleSideDiffElementViewModel(
|
|
596
|
+
result.push(( (new SingleSideDiffElementViewModel(
|
|
598
597
|
modifiedModel,
|
|
599
598
|
originalModel,
|
|
600
599
|
undefined,
|
|
@@ -602,7 +601,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
602
601
|
'insert',
|
|
603
602
|
eventDispatcher,
|
|
604
603
|
initData
|
|
605
|
-
)));
|
|
604
|
+
))));
|
|
606
605
|
}
|
|
607
606
|
return result;
|
|
608
607
|
}
|
|
@@ -614,7 +613,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
614
613
|
if (!info) {
|
|
615
614
|
return;
|
|
616
615
|
}
|
|
617
|
-
diffSide = ( info.notebook.toString()) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified;
|
|
616
|
+
diffSide = ( (info.notebook.toString())) === this._model?.original.resource.toString() ? DiffSide.Original : DiffSide.Modified;
|
|
618
617
|
}
|
|
619
618
|
else {
|
|
620
619
|
diffSide = diffElement.type === 'insert' ? DiffSide.Modified : DiffSide.Original;
|
|
@@ -628,7 +627,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
628
627
|
const relayout = (cell, height) => {
|
|
629
628
|
this._list.updateElementHeight2(cell, height);
|
|
630
629
|
};
|
|
631
|
-
if (( this.pendingLayouts.has(cell))) {
|
|
630
|
+
if (( (this.pendingLayouts.has(cell)))) {
|
|
632
631
|
this.pendingLayouts.get(cell).dispose();
|
|
633
632
|
}
|
|
634
633
|
let r;
|
|
@@ -641,7 +640,9 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
641
640
|
layoutDisposable.dispose();
|
|
642
641
|
r();
|
|
643
642
|
}));
|
|
644
|
-
return (
|
|
643
|
+
return (
|
|
644
|
+
(new Promise(resolve => { r = resolve; }))
|
|
645
|
+
);
|
|
645
646
|
}
|
|
646
647
|
setScrollTop(scrollTop) {
|
|
647
648
|
this._list.scrollTop = scrollTop;
|
|
@@ -705,7 +706,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
705
706
|
if (!activeWebview) {
|
|
706
707
|
return;
|
|
707
708
|
}
|
|
708
|
-
if (!( activeWebview.insetMapping.has(output.source))) {
|
|
709
|
+
if (!( (activeWebview.insetMapping.has(output.source)))) {
|
|
709
710
|
const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
|
|
710
711
|
await activeWebview.createOutput({ diffElement: cellDiffViewModel, cellHandle: cellViewModel.handle, cellId: cellViewModel.id, cellUri: cellViewModel.uri }, output, cellTop, getOffset());
|
|
711
712
|
}
|
|
@@ -729,7 +730,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
729
730
|
return cellInfo.diffElement.getCellByUri(cellInfo.cellUri);
|
|
730
731
|
}
|
|
731
732
|
getCellById(cellId) {
|
|
732
|
-
throw new Error('Not implemented');
|
|
733
|
+
throw ( (new Error('Not implemented')));
|
|
733
734
|
}
|
|
734
735
|
removeInset(cellDiffViewModel, cellViewModel, displayOutput, diffSide) {
|
|
735
736
|
this._insetModifyQueueByOutputId.queue(displayOutput.model.outputId + (diffSide === DiffSide.Modified ? '-right' : 'left'), async () => {
|
|
@@ -737,7 +738,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
737
738
|
if (!activeWebview) {
|
|
738
739
|
return;
|
|
739
740
|
}
|
|
740
|
-
if (!( activeWebview.insetMapping.has(displayOutput))) {
|
|
741
|
+
if (!( (activeWebview.insetMapping.has(displayOutput)))) {
|
|
741
742
|
return;
|
|
742
743
|
}
|
|
743
744
|
activeWebview.removeInsets([displayOutput]);
|
|
@@ -749,7 +750,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
749
750
|
if (!activeWebview) {
|
|
750
751
|
return;
|
|
751
752
|
}
|
|
752
|
-
if (!( activeWebview.insetMapping.has(displayOutput))) {
|
|
753
|
+
if (!( (activeWebview.insetMapping.has(displayOutput)))) {
|
|
753
754
|
return;
|
|
754
755
|
}
|
|
755
756
|
const cellTop = this._list.getCellViewScrollTop(cellDiffViewModel);
|
|
@@ -795,7 +796,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
795
796
|
}
|
|
796
797
|
getLayoutInfo() {
|
|
797
798
|
if (!this._list) {
|
|
798
|
-
throw new Error('Editor is not initalized successfully');
|
|
799
|
+
throw ( (new Error('Editor is not initalized successfully')));
|
|
799
800
|
}
|
|
800
801
|
return {
|
|
801
802
|
width: this._dimension.width,
|
|
@@ -807,25 +808,25 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
807
808
|
}
|
|
808
809
|
getCellOutputLayoutInfo(nestedCell) {
|
|
809
810
|
if (!this._model) {
|
|
810
|
-
throw new Error('Editor is not attached to model yet');
|
|
811
|
+
throw ( (new Error('Editor is not attached to model yet')));
|
|
811
812
|
}
|
|
812
813
|
const documentModel = CellUri.parse(nestedCell.uri);
|
|
813
814
|
if (!documentModel) {
|
|
814
|
-
throw new Error('Nested cell in the diff editor has wrong Uri');
|
|
815
|
+
throw ( (new Error('Nested cell in the diff editor has wrong Uri')));
|
|
815
816
|
}
|
|
816
|
-
const belongToOriginalDocument = ( this._model.original.notebook.uri.toString()) === ( documentModel.notebook.toString());
|
|
817
|
+
const belongToOriginalDocument = ( (this._model.original.notebook.uri.toString())) === ( (documentModel.notebook.toString()));
|
|
817
818
|
const viewModel = this._diffElementViewModels.find(element => {
|
|
818
819
|
const textModel = belongToOriginalDocument ? element.original : element.modified;
|
|
819
820
|
if (!textModel) {
|
|
820
821
|
return false;
|
|
821
822
|
}
|
|
822
|
-
if (( textModel.uri.toString()) === ( nestedCell.uri.toString())) {
|
|
823
|
+
if (( (textModel.uri.toString())) === ( (nestedCell.uri.toString()))) {
|
|
823
824
|
return true;
|
|
824
825
|
}
|
|
825
826
|
return false;
|
|
826
827
|
});
|
|
827
828
|
if (!viewModel) {
|
|
828
|
-
throw new Error('Nested cell in the diff editor does not match any diff element');
|
|
829
|
+
throw ( (new Error('Nested cell in the diff editor does not match any diff element')));
|
|
829
830
|
}
|
|
830
831
|
if (viewModel.type === 'unchanged') {
|
|
831
832
|
return this.getLayoutInfo();
|
|
@@ -871,7 +872,7 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
871
872
|
if (overviewRulerEnabled) {
|
|
872
873
|
this._overviewRuler.layout();
|
|
873
874
|
}
|
|
874
|
-
this._eventDispatcher?.emit([( new NotebookDiffLayoutChangedEvent({ width: true, fontInfo: true }, this.getLayoutInfo()))]);
|
|
875
|
+
this._eventDispatcher?.emit([( (new NotebookDiffLayoutChangedEvent({ width: true, fontInfo: true }, this.getLayoutInfo())))]);
|
|
875
876
|
}
|
|
876
877
|
dispose() {
|
|
877
878
|
this._isDisposed = true;
|
|
@@ -880,17 +881,17 @@ let NotebookTextDiffEditor = class NotebookTextDiffEditor extends EditorPane {
|
|
|
880
881
|
super.dispose();
|
|
881
882
|
}
|
|
882
883
|
};
|
|
883
|
-
NotebookTextDiffEditor = NotebookTextDiffEditor_1 = ( __decorate([
|
|
884
|
-
( __param(1, IInstantiationService)),
|
|
885
|
-
( __param(2, IThemeService)),
|
|
886
|
-
( __param(3, IContextKeyService)),
|
|
887
|
-
( __param(4, INotebookEditorWorkerService)),
|
|
888
|
-
( __param(5, IConfigurationService)),
|
|
889
|
-
( __param(6, ITelemetryService)),
|
|
890
|
-
( __param(7, IStorageService)),
|
|
891
|
-
( __param(8, INotebookExecutionStateService)),
|
|
892
|
-
( __param(9, ICodeEditorService))
|
|
893
|
-
], NotebookTextDiffEditor));
|
|
884
|
+
NotebookTextDiffEditor = NotebookTextDiffEditor_1 = ( (__decorate([
|
|
885
|
+
( (__param(1, IInstantiationService))),
|
|
886
|
+
( (__param(2, IThemeService))),
|
|
887
|
+
( (__param(3, IContextKeyService))),
|
|
888
|
+
( (__param(4, INotebookEditorWorkerService))),
|
|
889
|
+
( (__param(5, IConfigurationService))),
|
|
890
|
+
( (__param(6, ITelemetryService))),
|
|
891
|
+
( (__param(7, IStorageService))),
|
|
892
|
+
( (__param(8, INotebookExecutionStateService))),
|
|
893
|
+
( (__param(9, ICodeEditorService)))
|
|
894
|
+
], NotebookTextDiffEditor)));
|
|
894
895
|
registerZIndex(ZIndex.Base, 10, 'notebook-diff-view-viewport-slider');
|
|
895
896
|
registerThemingParticipant((theme, collector) => {
|
|
896
897
|
const diffDiagonalFillColor = theme.getColor(diffDiagonalFill);
|