add filters, #13807

This commit is contained in:
Johannes Rieken
2017-09-21 10:46:59 +02:00
parent ad4b098a4a
commit c7630e1858
4 changed files with 26 additions and 13 deletions

View File

@@ -116,16 +116,18 @@ export interface MainThreadDiagnosticsShape extends IDisposable {
}
export interface MainThreadDialogOpenOptions {
defaultResource?: URI;
defaultUri?: URI;
openLabel?: string;
openFiles?: boolean;
openFolders?: boolean;
openMany?: boolean;
filters: { [name: string]: string[] };
}
export interface MainThreadDialogSaveOptions {
defaultResource?: URI;
defaultUri?: URI;
saveLabel?: string;
filters: { [name: string]: string[] };
}
export interface MainThreadDiaglogsShape extends IDisposable {

View File

@@ -17,13 +17,13 @@ export class ExtHostDialogs {
}
showOpenDialog(options: vscode.OpenDialogOptions): Thenable<URI[]> {
return this._proxy.$showOpenDialog(<any>options).then(filepaths => {
return this._proxy.$showOpenDialog(options).then(filepaths => {
return filepaths && filepaths.map(URI.file);
});
}
showSaveDialog(options: vscode.SaveDialogOptions): Thenable<URI> {
return this._proxy.$showSaveDialog(<any>options).then(filepath => {
return this._proxy.$showSaveDialog(options).then(filepath => {
return filepath && URI.file(filepath);
});
}