src/vs/editor/common/services/modelUndoRedoParticipant.ts/ModelUndoRedoParticipant/prepareUndoRedo
class ModelUndoRedoParticipant:	public prepareUndoRedo(element: MultiModelEditStackElement): IDisposable | Promise<IDisposable> {
		// Load all the needed text models
		const missingModels = element.getMissingModels();
		if (missingModels.length === 0) {
			// All models are available!
			return Disposable.None;
		}

		const disposablesPromises = missingModels.map(async (uri) => {
			try {
				const reference = await this._textModelService.createModelReference(uri);
				return <IDisposable>reference;
			} catch (err) {
				// This model could not be loaded, maybe it was deleted in the meantime?
				return Disposable.None;
			}
		});

		return Promise.all(disposablesPromises).then(disposables => {
			return {
				dispose: () => dispose(disposables)
			};
		});
	}