src/vs/workbench/browser/parts/editor/editorStatus.ts/EditorStatus/onModeChange
class EditorStatus:	private onModeChange(editorWidget: ICodeEditor | undefined, editorInput: IEditorInput | undefined): void {
		let info: StateDelta = { type: 'mode', mode: undefined };

		// We only support text based editors
		if (editorWidget && editorInput && toEditorWithModeSupport(editorInput)) {
			const textModel = editorWidget.getModel();
			if (textModel) {
				const modeId = textModel.getLanguageIdentifier().language;
				info.mode = withNullAsUndefined(this.modeService.getLanguageName(modeId));
			}
		}

		this.updateState(info);
	}