Add VS Code native New Project create flow (#15906)

* Add VS Code native New Project create flow

* Update project name title

* Ignore focus out

* comments

* ellipsis
This commit is contained in:
Charles Gagnon
2021-06-25 10:46:40 -07:00
committed by GitHub
parent 1caef2dc6e
commit 33ff661c6f
4 changed files with 116 additions and 13 deletions

View File

@@ -13,11 +13,13 @@ import { OpenExistingDialog } from './dialogs/openExistingDialog';
import { IWorkspaceService } from './common/interfaces';
import { IconPathHelper } from './common/iconHelper';
import { ProjectDashboard } from './dialogs/projectDashboard';
import { getAzdataApi } from './common/utils';
import { createNewProjectWithQuickpick } from './dialogs/newProjectQuickpick';
export async function activate(context: vscode.ExtensionContext): Promise<IExtension> {
const workspaceService = new WorkspaceService(context);
await workspaceService.loadTempProjects();
await workspaceService.checkForProjectsNotAddedToWorkspace();
workspaceService.checkForProjectsNotAddedToWorkspace();
context.subscriptions.push(vscode.workspace.onDidChangeWorkspaceFolders(async () => {
await workspaceService.checkForProjectsNotAddedToWorkspace();
}));
@@ -31,8 +33,13 @@ export async function activate(context: vscode.ExtensionContext): Promise<IExten
setProjectProviderContextValue(workspaceService);
context.subscriptions.push(vscode.commands.registerCommand('projects.new', async () => {
const dialog = new NewProjectDialog(workspaceService);
await dialog.open();
if (getAzdataApi()) {
const dialog = new NewProjectDialog(workspaceService);
await dialog.open();
} else {
await createNewProjectWithQuickpick(workspaceService);
}
}));
context.subscriptions.push(vscode.commands.registerCommand('projects.openExisting', async () => {