@@ -33,7 +33,7 @@ export async function generateProjectWizard() {
3333 }
3434
3535 const state : Partial < ProjectGenState > = {
36- totalSteps : 7 + ( apiCapabilities . canExcludeSampleCode ? 1 : 0 )
36+ totalSteps : 7 + ( apiCapabilities . supportsNoCodeParameter || apiCapabilities . supportsNoExamplesParameter ? 1 : 0 )
3737 } ;
3838
3939 async function collectInputs ( state : Partial < ProjectGenState > ) {
@@ -149,18 +149,18 @@ export async function generateProjectWizard() {
149149 } ) ;
150150 return ( input : MultiStepInput ) => ExtensionsPicker . createExtensionsPicker (
151151 input , state , { showLastUsed : true , showRequiredExtensions : true , allowZeroExtensions : true } ,
152- ( apiCapabilities . canExcludeSampleCode ? inputGenerateSampleCode : undefined ) ) ;
152+ ( apiCapabilities . supportsNoCodeParameter || apiCapabilities . supportsNoExamplesParameter ? inputGenerateSampleCode : undefined ) ) ;
153153 }
154154
155155 async function inputGenerateSampleCode ( input : MultiStepInput , state : Partial < ProjectGenState > ) {
156- const YES : string = ' Include sample code' ;
157- const NO : string = ' Do not include sample code' ;
156+ const YES : string = ` Include ${ apiCapabilities . supportsNoCodeParameter ? 'starter' : 'example' } code` ;
157+ const NO : string = ` Do not include ${ apiCapabilities . supportsNoCodeParameter ? 'starter' : 'example' } code` ;
158158 const quickPickItems : QuickPickItem [ ] = [
159- { label : YES , picked : true } ,
160- { label : NO }
159+ { label : YES , picked : true } ,
160+ { label : NO }
161161 ] ;
162162
163- state . isGenerateSampleCode = ( await input . showQuickPick < QuickPickItem , QuickPickParameters < QuickPickItem > > ( {
163+ state . shouldGenerateCode = ( await input . showQuickPick < QuickPickItem , QuickPickParameters < QuickPickItem > > ( {
164164 title : INPUT_TITLE ,
165165 placeholder : 'Should sample code be included? Additional dependencies may be added along with the sample.' ,
166166 step : input . getStepNumber ( ) ,
@@ -176,7 +176,7 @@ export async function generateProjectWizard() {
176176 const projectGenState : ProjectGenState = state as ProjectGenState ;
177177 saveDefaults ( projectGenState ) ;
178178 deleteFolderIfExists ( getNewProjectDirectory ( projectGenState ) ) ;
179- await downloadAndSetupProject ( projectGenState ) ;
179+ await downloadAndSetupProject ( projectGenState , apiCapabilities ) ;
180180}
181181
182182async function getTargetDirectory ( projectName : string ) {
@@ -249,9 +249,9 @@ function getNewProjectDirectory(state: ProjectGenState): Uri {
249249 return Uri . file ( path . join ( state . targetDir . fsPath , state . artifactId ) ) ;
250250}
251251
252- async function downloadAndSetupProject ( state : ProjectGenState ) : Promise < void > {
252+ async function downloadAndSetupProject ( state : ProjectGenState , codeQuarkusFunctionality : CodeQuarkusFunctionality ) : Promise < void > {
253253 const projectDir : Uri = getNewProjectDirectory ( state ) ;
254- const zip : ZipFile = await downloadProject ( state ) ;
254+ const zip : ZipFile = await downloadProject ( state , codeQuarkusFunctionality ) ;
255255 zip . on ( 'end' , ( ) => {
256256 openProject ( projectDir ) ;
257257 } ) ;
0 commit comments