mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -9,10 +9,9 @@ import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { Dialog } from 'vs/base/browser/ui/dialog/dialog';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { attachDialogStyler } from 'vs/platform/theme/common/styler';
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { EventHelper } from 'vs/base/browser/dom';
|
||||
|
||||
@@ -70,7 +69,7 @@ export class DialogService implements IDialogService {
|
||||
async show(severity: Severity, message: string, buttons: string[], options?: IDialogOptions): Promise<number> {
|
||||
this.logService.trace('DialogService#show', message);
|
||||
|
||||
const dialogDisposables: IDisposable[] = [];
|
||||
const dialogDisposables = new DisposableStore();
|
||||
const dialog = new Dialog(
|
||||
this.layoutService.container,
|
||||
message,
|
||||
@@ -84,14 +83,12 @@ export class DialogService implements IDialogService {
|
||||
}
|
||||
});
|
||||
|
||||
dialogDisposables.push(dialog);
|
||||
dialogDisposables.push(attachDialogStyler(dialog, this.themeService));
|
||||
dialogDisposables.add(dialog);
|
||||
dialogDisposables.add(attachDialogStyler(dialog, this.themeService));
|
||||
|
||||
const choice = await dialog.show();
|
||||
dispose(dialogDisposables);
|
||||
dialogDisposables.dispose();
|
||||
|
||||
return choice;
|
||||
}
|
||||
}
|
||||
|
||||
registerSingleton(IDialogService, DialogService, true);
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface IConfirmationResult {
|
||||
|
||||
/**
|
||||
* This will only be defined if the confirmation was created
|
||||
* with the checkox option defined.
|
||||
* with the checkbox option defined.
|
||||
*/
|
||||
checkboxChecked?: boolean;
|
||||
}
|
||||
@@ -201,6 +201,11 @@ export interface IFileDialogService {
|
||||
*/
|
||||
pickWorkspaceAndOpen(options: IPickAndOpenOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* Shows a save file file dialog and save the file at the chosen file URI.
|
||||
*/
|
||||
pickFileToSave(options: ISaveDialogOptions): Promise<URI | undefined>;
|
||||
|
||||
/**
|
||||
* Shows a save file dialog and returns the chosen file URI.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user