add initial SDK-style project migration (#18827)

* add initial SDK-style project migration

* addressing comments
This commit is contained in:
Kim Santiago
2022-03-28 16:29:14 -07:00
committed by GitHub
parent aad20bc338
commit 2f825f8a97
4 changed files with 112 additions and 1 deletions

View File

@@ -862,6 +862,24 @@ export class ProjectsController {
}
}
/**
* Converts a legacy style project to an SDK-style project
* @param context a treeItem in a project's hierarchy, to be used to obtain a Project
*/
public async convertToSdkStyleProject(context: dataworkspace.WorkspaceTreeItem): Promise<void> {
const project = this.getProjectFromContext(context);
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 (result === constants.learnMore) {
void vscode.env.openExternal(vscode.Uri.parse(constants.sdkLearnMoreUrl!));
}
}
/**
* Adds a database reference to the project
* @param context a treeItem in a project's hierarchy, to be used to obtain a Project