@@ -346,7 +346,7 @@ export class ConfigurationManager implements IConfigurationManager {
346346 private setCompoundSchemaValues ( ) : void {
347347 const compoundConfigurationsSchema = ( < IJSONSchema > launchSchema . properties ! [ 'compounds' ] . items ) . properties ! [ 'configurations' ] ;
348348 const launchNames = this . launches . map ( l =>
349- l . getConfigurationNames ( false ) ) . reduce ( ( first , second ) => first . concat ( second ) , [ ] ) ;
349+ l . getConfigurationNames ( true ) ) . reduce ( ( first , second ) => first . concat ( second ) , [ ] ) ;
350350 ( < IJSONSchema > compoundConfigurationsSchema . items ) . oneOf ! [ 0 ] . enum = launchNames ;
351351 ( < IJSONSchema > compoundConfigurationsSchema . items ) . oneOf ! [ 1 ] . properties ! . name . enum = launchNames ;
352352
@@ -523,7 +523,7 @@ abstract class AbstractLaunch {
523523 return config . compounds . filter ( compound => compound . name === name ) . pop ( ) ;
524524 }
525525
526- getConfigurationNames ( includeCompounds = true ) : string [ ] {
526+ getConfigurationNames ( ignoreCompoundsAndPresentation = false ) : string [ ] {
527527 const config = this . getConfig ( ) ;
528528 if ( ! config || ( ! Array . isArray ( config . configurations ) && ! Array . isArray ( config . compounds ) ) ) {
529529 return [ ] ;
@@ -532,12 +532,14 @@ abstract class AbstractLaunch {
532532 if ( config . configurations ) {
533533 configurations . push ( ...config . configurations . filter ( cfg => cfg && typeof cfg . name === 'string' ) ) ;
534534 }
535- if ( includeCompounds && config . compounds ) {
536- if ( config . compounds ) {
537- configurations . push ( ...config . compounds . filter ( compound => typeof compound . name === 'string' && compound . configurations && compound . configurations . length ) ) ;
538- }
535+
536+ if ( ignoreCompoundsAndPresentation ) {
537+ return configurations . map ( c => c . name ) ;
539538 }
540539
540+ if ( config . compounds ) {
541+ configurations . push ( ...config . compounds . filter ( compound => typeof compound . name === 'string' && compound . configurations && compound . configurations . length ) ) ;
542+ }
541543 return getVisibleAndSorted ( configurations ) . map ( c => c . name ) ;
542544 }
543545 }
0 commit comments