mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Add confirmation before converting to SDK-style project (#18893)
* Add confirmation before updating to SDK-style project * update string * update string * update other learn more url
This commit is contained in:
@@ -887,20 +887,27 @@ export class ProjectsController {
|
||||
*/
|
||||
public async convertToSdkStyleProject(context: dataworkspace.WorkspaceTreeItem): Promise<void> {
|
||||
const project = this.getProjectFromContext(context);
|
||||
const updateResult = await project.convertProjectToSdkStyle();
|
||||
|
||||
if (!updateResult) {
|
||||
void vscode.window.showErrorMessage(constants.updatedToSdkStyleError(project.projectFileName));
|
||||
} else {
|
||||
void this.reloadProject(context);
|
||||
// confirm that user wants to update the project and knows the SSDT doesn't have support for displaying glob files yet
|
||||
await vscode.window.showWarningMessage(constants.convertToSdkStyleConfirmation(project.projectFileName), { modal: true }, constants.yesString).then(async (result) => {
|
||||
if (result === constants.yesString) {
|
||||
const updateResult = await project.convertProjectToSdkStyle();
|
||||
void this.reloadProject(context);
|
||||
|
||||
// show message that project file can be simplified
|
||||
const result = await vscode.window.showInformationMessage(constants.projectUpdatedToSdkStyle(project.projectFileName), constants.learnMore);
|
||||
if (!updateResult) {
|
||||
void vscode.window.showErrorMessage(constants.updatedToSdkStyleError(project.projectFileName));
|
||||
} else {
|
||||
void this.reloadProject(context);
|
||||
|
||||
if (result === constants.learnMore) {
|
||||
void vscode.env.openExternal(vscode.Uri.parse(constants.sdkLearnMoreUrl!));
|
||||
// show message that project file can be simplified
|
||||
const result = await vscode.window.showInformationMessage(constants.projectUpdatedToSdkStyle(project.projectFileName), constants.learnMore);
|
||||
|
||||
if (result === constants.learnMore) {
|
||||
void vscode.env.openExternal(vscode.Uri.parse(constants.sdkLearnMoreUrl!));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user