src/vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint/untitledTextEditorHint.ts/UntitledTextEditorHintContentWidget/getDomNode
class UntitledTextEditorHintContentWidget:	getDomNode(): HTMLElement {
		if (!this.domNode) {
			this.domNode = $('.untitled-hint');
			this.domNode.style.width = 'max-content';

			const hintMsg = localize({ key: 'message', comment: ['Presereve double-square brackets and their order'] }, '[[Select a language]], or [[open a different editor]] to get started.\nStart typing to dismiss or [[don\'t show]] this again.');
			const hintHandler: IContentActionHandler = {
				disposables: this.toDispose,
				callback: (index, event) => {
					switch (index) {
						case '0':
							languageOnClickOrTap(event.browserEvent);
							break;
						case '1':
							chooseEditorOnClickOrTap(event.browserEvent);
							break;
						case '2':
							dontShowOnClickOrTap();
							break;
					}
				}
			};

			const hintElement = renderFormattedText(hintMsg, {
				actionHandler: hintHandler,
				renderCodeSegments: false,
			});
			this.domNode.append(hintElement);

			// ugly way to associate keybindings...
			const keybindingsLookup = [ChangeLanguageAction.ID, ApplyFileSnippetAction.Id, 'welcome.showNewFileEntries'];
			for (const anchor of hintElement.querySelectorAll('A')) {
				(<HTMLAnchorElement>anchor).style.cursor = 'pointer';
				const id = keybindingsLookup.shift();
				const title = id && this.keybindingService.lookupKeybinding(id)?.getLabel();
				(<HTMLAnchorElement>anchor).title = title ?? '';
			}

			// the actual command handlers...
			const languageOnClickOrTap = async (e: UIEvent) => {
				e.stopPropagation();
				// Need to focus editor before so current editor becomes active and the command is properly executed
				this.editor.focus();
				await this.commandService.executeCommand(ChangeLanguageAction.ID, { from: 'hint' });
				this.editor.focus();
			};

			const chooseEditorOnClickOrTap = async (e: UIEvent) => {
				e.stopPropagation();

				const activeEditorInput = this.editorGroupsService.activeGroup.activeEditor;
				const newEditorSelected = await this.commandService.executeCommand('welcome.showNewFileEntries', { from: 'hint' });

				// Close the active editor as long as it is untitled (swap the editors out)
				if (newEditorSelected && activeEditorInput !== null && activeEditorInput.resource?.scheme === Schemas.untitled) {
					this.editorGroupsService.activeGroup.closeEditor(activeEditorInput, { preserveFocus: true });
				}
			};

			const dontShowOnClickOrTap = () => {
				this.configurationService.updateValue(untitledTextEditorHintSetting, 'hidden');
				this.dispose();
				this.editor.focus();
			};

			this.toDispose.add(dom.addDisposableListener(this.domNode, 'click', () => {
				this.editor.focus();
			}));

			this.domNode.style.fontStyle = 'italic';
			this.domNode.style.paddingLeft = '4px';
			this.editor.applyFontInfo(this.domNode);
		}

		return this.domNode;
	}