Change how data-workspace activates project extensions (#21470)

* change how data workspace activates project extensions

* cleanup

* undo whitespace change

* Update extensions/data-workspace/src/services/workspaceService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

* activate extensions on data workspace new and open commands

* Update extensions/data-workspace/src/services/workspaceService.ts

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Kim Santiago
2023-01-04 11:47:51 -08:00
committed by GitHub
parent a1803a823b
commit 5fbbc3a76b
3 changed files with 33 additions and 7 deletions

View File

@@ -54,6 +54,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
const registerCommandStartTime = new Date().getTime();
context.subscriptions.push(vscode.commands.registerCommand('projects.new', async () => {
// Make sure all project providing extensions are activated to be sure the project templates show up
await workspaceService.ensureProviderExtensionLoaded(undefined, true);
if (azdataApi) {
const dialog = new NewProjectDialog(workspaceService);
await dialog.open();
@@ -63,6 +66,9 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
}));
context.subscriptions.push(vscode.commands.registerCommand('projects.openExisting', async () => {
// Make sure all project providing extensions are activated so that all supported project types show up in the file filter
await workspaceService.ensureProviderExtensionLoaded(undefined, true);
if (azdataApi) {
const dialog = new OpenExistingDialog(workspaceService);
await dialog.open();