Fix how data workspace handles untitled workspaces (#14505)

* add more workspace apis

* update dialog and check workspace scheme

* cleanup

* add comment

* update create project from db dialog

* cleanup

* update names

* add test
This commit is contained in:
Kim Santiago
2021-03-03 15:31:21 -08:00
committed by GitHub
parent 6ecacd6faa
commit 42fba14d88
12 changed files with 100 additions and 32 deletions

View File

@@ -244,6 +244,13 @@ export function getDataWorkspaceExtensionApi(): dataworkspace.IExtension {
return extension.exports;
}
/**
* if the current workspace is untitled, the returned URI of vscode.workspace.workspaceFile will use the `untitled` scheme
*/
export function isCurrentWorkspaceUntitled(): boolean {
return !!vscode.workspace.workspaceFile && vscode.workspace.workspaceFile.scheme.toLowerCase() === 'untitled';
}
/*
* Returns the default deployment options from DacFx
*/