mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-22 21:00:30 -04:00
* Added data service context menu: file related operations. All new files are ported from SqlOpsStudio. Will remove these functionality from SqlOpsStudio. * Used the existing constant hadoopKnoxEndpointName * Rename nodeType name from hdfs to bdc. So we can have file context menu in both mssql and SqlOpsStudio. Need to add "Create External Table from CSV" support for bdc nodeType * Rename bdc to mssqlcluster
37 lines
969 B
TypeScript
37 lines
969 B
TypeScript
'use strict';
|
|
|
|
// This code is originally from https://github.com/DonJayamanne/bowerVSCode
|
|
// License: https://github.com/DonJayamanne/bowerVSCode/blob/master/LICENSE
|
|
|
|
import * as nls from 'vscode-nls';
|
|
const localize = nls.loadMessageBundle();
|
|
|
|
import { window } from 'vscode';
|
|
import Prompt from './prompt';
|
|
import EscapeException from '../escapeException';
|
|
|
|
export default class ConfirmPrompt extends Prompt {
|
|
|
|
constructor(question: any, ignoreFocusOut?: boolean) {
|
|
super(question, ignoreFocusOut);
|
|
}
|
|
|
|
public render(): any {
|
|
let choices: { [id: string]: boolean } = {};
|
|
choices[localize('msgYes', 'Yes')] = true;
|
|
choices[localize('msgNo', 'No')] = false;
|
|
|
|
let options = this.defaultQuickPickOptions;
|
|
options.placeHolder = this._question.message;
|
|
|
|
return window.showQuickPick(Object.keys(choices), options)
|
|
.then(result => {
|
|
if (result === undefined) {
|
|
throw new EscapeException();
|
|
}
|
|
|
|
return choices[result] || false;
|
|
});
|
|
}
|
|
}
|