src/vs/workbench/common/dialogs.ts/DialogsModel/show
class DialogsModel:	show(dialog: IDialog): IDialogHandle {
		let resolver: (value?: IDialogResult) => void;

		const item: IDialogViewItem = {
			args: dialog,
			close: (result) => { this.dialogs.splice(0, 1); resolver(result); }
		};

		this.dialogs.push(item);
		this._onDidShowDialog.fire();

		return {
			item,
			result: new Promise(resolve => { resolver = resolve; })
		};
	}