src/vs/workbench/services/untitled/common/untitledTextEditorHandler.ts/UntitledTextEditorWorkingCopyEditorHandler/installHandler
class UntitledTextEditorWorkingCopyEditorHandler:	private installHandler(): void {
		this._register(this.workingCopyEditorService.registerHandler({
			handles: workingCopy => workingCopy.resource.scheme === Schemas.untitled && workingCopy.typeId === NO_TYPE_ID,
			isOpen: (workingCopy, editor) => editor instanceof UntitledTextEditorInput && isEqual(workingCopy.resource, editor.resource),
			createEditor: workingCopy => {
				let editorInputResource: URI;

				// If the untitled has an associated resource,
				// ensure to restore the local resource it had
				if (isUntitledWithAssociatedResource(workingCopy.resource)) {
					editorInputResource = toLocalResource(workingCopy.resource, this.environmentService.remoteAuthority, this.pathService.defaultUriScheme);
				} else {
					editorInputResource = workingCopy.resource;
				}

				return this.textEditorService.createTextEditor({ resource: editorInputResource, forceUntitled: true });
			}
		}));
	}