import * as path from 'path' ; import { InputBoxOptions } from "vscode" ; import { AzureWizardPromptStep } from "vscode-azureextensionui" ; import { localize } from "../../../localize" ; import { IJavaProjectWizardContext , validateMavenIdentifier } from "./IJavaProjectWizardContext" ; export class JavaArtifactIdStep extends AzureWizardPromptStep < IJavaProjectWizardContext > { public async prompt ( context ) { const options = { placeHolder : localize ( 'artifactIdPlaceholder' , 'Artifact id' ) , prompt : localize ( 'artifactIdPrompt' , 'Provide an artifact id' ) , validateInput : validateMavenIdentifier , value : path . basename ( context . projectPath ) } ; context . javaArtifactId = await context . ui . showInputBox ( options ) ; } public shouldPrompt ( context ) { return ! context . javaArtifactId ; } }