mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
Adding progress indicator for autorest generation (#17371)
This commit is contained in:
@@ -433,6 +433,7 @@ export function generatingProjectFailed(errorMessage: string) { return localize(
|
||||
export const noSqlFilesGenerated = localize('noSqlFilesGenerated', "No .sql files were generated by Autorest. Please confirm that your spec contains model definitions, or check the output log for details.");
|
||||
export function multipleMostDeploymentScripts(count: number) { return localize('multipleMostDeploymentScripts', "Unexpected number of {0} files: {1}", autorestPostDeploymentScriptName, count); }
|
||||
export const specSelectionText = localize('specSelectionText', "OpenAPI/Swagger spec");
|
||||
export function generatingProjectFromAutorest(specName: string) { return localize('generatingProjectFromAutorest', "Generating new SQL project from {0}... Check output window for details.", specName); }
|
||||
|
||||
// System dbs
|
||||
export const systemDbs = ['master', 'msdb', 'tempdb', 'model'];
|
||||
|
||||
@@ -914,7 +914,14 @@ export class ProjectsController {
|
||||
}
|
||||
|
||||
public async generateAutorestFiles(specPath: string, newProjectFolder: string): Promise<string | undefined> {
|
||||
return this.autorestHelper.generateAutorestFiles(specPath, newProjectFolder);
|
||||
return vscode.window.withProgress(
|
||||
{
|
||||
location: vscode.ProgressLocation.Notification,
|
||||
title: constants.generatingProjectFromAutorest(path.basename(specPath)),
|
||||
cancellable: false
|
||||
}, async (_progress, _token) => {
|
||||
return this.autorestHelper.generateAutorestFiles(specPath, newProjectFolder);
|
||||
});
|
||||
}
|
||||
|
||||
public async openProjectInWorkspace(projectFilePath: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user