@@ -257,7 +257,9 @@ export class DatabaseUI extends DisposableObject {
257257 "codeQLDatabases.openDatabaseFolder" : createMultiSelectionCommand (
258258 this . handleOpenFolder . bind ( this ) ,
259259 ) ,
260- "codeQLDatabases.addDatabaseSource" : this . handleAddSource . bind ( this ) ,
260+ "codeQLDatabases.addDatabaseSource" : createMultiSelectionCommand (
261+ this . handleAddSource . bind ( this ) ,
262+ ) ,
261263 "codeQLDatabases.removeOrphanedDatabases" :
262264 this . handleRemoveOrphanedDatabases . bind ( this ) ,
263265 } ;
@@ -698,16 +700,9 @@ export class DatabaseUI extends DisposableObject {
698700 * When a database is first added in the "Databases" view, its source folder is added to the workspace.
699701 * If the source folder is removed from the workspace for some reason, we want to be able to re-add it if need be.
700702 */
701- private async handleAddSource (
702- databaseItem : DatabaseItem ,
703- multiSelect : DatabaseItem [ ] | undefined ,
704- ) : Promise < void > {
705- if ( multiSelect ?. length ) {
706- for ( const dbItem of multiSelect ) {
707- await this . databaseManager . addDatabaseSourceArchiveFolder ( dbItem ) ;
708- }
709- } else {
710- await this . databaseManager . addDatabaseSourceArchiveFolder ( databaseItem ) ;
703+ private async handleAddSource ( databaseItems : DatabaseItem [ ] ) : Promise < void > {
704+ for ( const dbItem of databaseItems ) {
705+ await this . databaseManager . addDatabaseSourceArchiveFolder ( dbItem ) ;
711706 }
712707 }
713708
0 commit comments