Skip to content

Commit 4d77159

Browse files
committed
💄 rename ChangeLanguage to ChangeCellLanguage
1 parent 4574413 commit 4d77159

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

src/vs/workbench/api/browser/mainThreadNotebookDocuments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class MainThreadNotebookDocuments implements MainThreadNotebookDocumentsS
8888
append: e.append
8989
});
9090
break;
91-
case NotebookCellsChangeType.ChangeLanguage:
91+
case NotebookCellsChangeType.ChangeCellLanguage:
9292
case NotebookCellsChangeType.ChangeCellContent:
9393
case NotebookCellsChangeType.ChangeCellMetadata:
9494
case NotebookCellsChangeType.ChangeCellInternalMetadata:

src/vs/workbench/api/common/extHostNotebookDocument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export class ExtHostNotebookDocument {
242242
this._setCellOutputItems(rawEvent.index, rawEvent.outputId, rawEvent.append, rawEvent.outputItems);
243243
relaxedCellChanges.push({ cell: this._cells[rawEvent.index].apiCell, outputs: this._cells[rawEvent.index].apiCell.outputs });
244244

245-
} else if (rawEvent.kind === notebookCommon.NotebookCellsChangeType.ChangeLanguage) {
245+
} else if (rawEvent.kind === notebookCommon.NotebookCellsChangeType.ChangeCellLanguage) {
246246
this._changeCellLanguage(rawEvent.index, rawEvent.language);
247247
relaxedCellChanges.push({ cell: this._cells[rawEvent.index].apiCell, document: this._cells[rawEvent.index].apiCell.document });
248248

src/vs/workbench/api/test/browser/extHostNotebook.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ suite('NotebookCell#Document', function () {
409409

410410
extHostNotebookDocuments.$acceptModelChanged(notebook.uri, new SerializableObjectWithBuffers({
411411
versionId: 12, rawEvents: [{
412-
kind: NotebookCellsChangeType.ChangeLanguage,
412+
kind: NotebookCellsChangeType.ChangeCellLanguage,
413413
index: 0,
414414
language: 'fooLang'
415415
}]
@@ -508,7 +508,7 @@ suite('NotebookCell#Document', function () {
508508
extHostNotebookDocuments.$acceptModelChanged(notebook.uri, new SerializableObjectWithBuffers({
509509
versionId: 12,
510510
rawEvents: [{
511-
kind: NotebookCellsChangeType.ChangeLanguage,
511+
kind: NotebookCellsChangeType.ChangeCellLanguage,
512512
index: 0,
513513
language: 'fooLang'
514514
}]

src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class ImplictKernelSelector implements IDisposable {
279279
case NotebookCellsChangeType.ChangeCellContent:
280280
case NotebookCellsChangeType.ModelChange:
281281
case NotebookCellsChangeType.Move:
282-
case NotebookCellsChangeType.ChangeLanguage:
282+
case NotebookCellsChangeType.ChangeCellLanguage:
283283
logService.trace('IMPLICIT kernel selection because of change event', event.kind);
284284
selectKernel();
285285
break;

src/vs/workbench/contrib/notebook/common/model/notebookTextModel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel
324324

325325
case 'language':
326326
this._pauseableEmitter.fire({
327-
rawEvents: [{ kind: NotebookCellsChangeType.ChangeLanguage, index: this._getCellIndexByHandle(cell.handle), language: cell.language, transient: false }],
327+
rawEvents: [{ kind: NotebookCellsChangeType.ChangeCellLanguage, index: this._getCellIndexByHandle(cell.handle), language: cell.language, transient: false }],
328328
versionId: this.versionId,
329329
synchronous: true,
330330
endSelectionState: undefined
@@ -937,7 +937,7 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel
937937
}
938938

939939
this._pauseableEmitter.fire({
940-
rawEvents: [{ kind: NotebookCellsChangeType.ChangeLanguage, index: this._cells.indexOf(cell), language: languageId, transient: false }],
940+
rawEvents: [{ kind: NotebookCellsChangeType.ChangeCellLanguage, index: this._cells.indexOf(cell), language: languageId, transient: false }],
941941
versionId: this.versionId,
942942
synchronous: true,
943943
endSelectionState: undefined

src/vs/workbench/contrib/notebook/common/notebookCommon.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ export interface IMainCellDto {
266266
export enum NotebookCellsChangeType {
267267
ModelChange = 1,
268268
Move = 2,
269-
ChangeLanguage = 5,
269+
ChangeCellLanguage = 5,
270270
Initialize = 6,
271271
ChangeCellMetadata = 7,
272272
Output = 8,
@@ -317,7 +317,7 @@ export interface NotebookOutputItemChangedEvent {
317317
}
318318

319319
export interface NotebookCellsChangeLanguageEvent {
320-
readonly kind: NotebookCellsChangeType.ChangeLanguage;
320+
readonly kind: NotebookCellsChangeType.ChangeCellLanguage;
321321
readonly index: number;
322322
readonly language: string;
323323
}

src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class MirrorNotebookDocument {
122122
} else if (e.kind === NotebookCellsChangeType.Output) {
123123
const cell = this.cells[e.index];
124124
cell.outputs = e.outputs;
125-
} else if (e.kind === NotebookCellsChangeType.ChangeLanguage) {
125+
} else if (e.kind === NotebookCellsChangeType.ChangeCellLanguage) {
126126
const cell = this.cells[e.index];
127127
cell.language = e.language;
128128
} else if (e.kind === NotebookCellsChangeType.ChangeCellMetadata) {

0 commit comments

Comments
 (0)