Add SDK style project option to create project from db dialog (#18243)

* add sdk style project template

* update description and order

* add SDK style project option to create project from db dialog

* fix test

* switch to checkbox

* remove not used string

* fix test
This commit is contained in:
Kim Santiago
2022-02-10 10:49:46 -08:00
committed by GitHub
parent 75e66d17cb
commit fa4161d9a1
5 changed files with 20 additions and 4 deletions

View File

@@ -1261,7 +1261,7 @@ export class ProjectsController {
const newProjFilePath = await this.createNewProject({
newProjName: model.projName,
folderUri: vscode.Uri.file(newProjFolderUri),
projectTypeId: constants.emptySqlDatabaseProjectTypeId
projectTypeId: model.sdkStyle ? constants.emptySqlDatabaseSdkProjectTypeId : constants.emptySqlDatabaseProjectTypeId
});
model.filePath = path.dirname(newProjFilePath);
@@ -1271,7 +1271,9 @@ export class ProjectsController {
await this.createProjectFromDatabaseApiCall(model); // Call ExtractAPI in DacFx Service
let fileFolderList: vscode.Uri[] = model.extractTarget === mssql.ExtractTarget.file ? [vscode.Uri.file(model.filePath)] : await this.generateList(model.filePath); // Create a list of all the files and directories to be added to project
await project.addToProject(fileFolderList); // Add generated file structure to the project
if (!model.sdkStyle) {
await project.addToProject(fileFolderList); // Add generated file structure to the project
}
// add project to workspace
const workspaceApi = utils.getDataWorkspaceExtensionApi();