import { AzureWizardPromptStep } from 'vscode-azureextensionui' ; import { localize } from '../../localize' ; import { getContainingWorkspace , selectWorkspaceFolder } from '../../utils/workspace' ; import { IProjectWizardContext } from './IProjectWizardContext' ; export class FolderListStep extends AzureWizardPromptStep < IProjectWizardContext > { public hideStepCount : boolean = true ; public static setProjectPath ( context , projectPath ) { context . projectPath = projectPath ; context . workspaceFolder = getContainingWorkspace ( projectPath ) ; context . workspacePath = ( context . workspaceFolder && context . workspaceFolder . uri . fsPath ) || projectPath ; if ( context . workspaceFolder ) { context . openBehavior = 'AlreadyOpen' ; } } public async prompt ( context ) { const placeHolder = localize ( 'selectNewProjectFolder' , 'Select the folder that will contain your function project' ) ; FolderListStep . setProjectPath ( context , await selectWorkspaceFolder ( context , placeHolder ) ) ; } public shouldPrompt ( context ) { return ! context . projectPath ; } }