File tree Expand file tree Collapse file tree 3 files changed +14
-10
lines changed
Expand file tree Collapse file tree 3 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export type QueryHistoryCommands = {
6464// Commands used for the local databases panel
6565export type LocalDatabasesCommands = {
6666 // Command palette commands
67+ "codeQL.chooseDatabaseFolder" : ( ) => Promise < void > ;
6768 "codeQL.upgradeCurrentDatabase" : ( ) => Promise < void > ;
6869 "codeQL.clearCache" : ( ) => Promise < void > ;
6970
Original file line number Diff line number Diff line change @@ -1220,16 +1220,6 @@ async function activateWithInstalledDistribution(
12201220 ) ,
12211221 ) ;
12221222
1223- ctx . subscriptions . push (
1224- commandRunnerWithProgress (
1225- "codeQL.chooseDatabaseFolder" ,
1226- ( progress : ProgressCallback , token : CancellationToken ) =>
1227- databaseUI . chooseDatabaseFolder ( progress , token ) ,
1228- {
1229- title : "Choose a Database from a Folder" ,
1230- } ,
1231- ) ,
1232- ) ;
12331223 ctx . subscriptions . push (
12341224 commandRunnerWithProgress (
12351225 "codeQL.chooseDatabaseArchive" ,
Original file line number Diff line number Diff line change @@ -208,6 +208,8 @@ export class DatabaseUI extends DisposableObject {
208208
209209 public getCommands ( ) : LocalDatabasesCommands {
210210 return {
211+ "codeQL.chooseDatabaseFolder" :
212+ this . handleChooseDatabaseFolderFromPalette . bind ( this ) ,
211213 "codeQL.setCurrentDatabase" : this . handleSetCurrentDatabase . bind ( this ) ,
212214 "codeQL.setDefaultTourDatabase" :
213215 this . handleSetDefaultTourDatabase . bind ( this ) ,
@@ -268,6 +270,17 @@ export class DatabaseUI extends DisposableObject {
268270 ) ;
269271 }
270272
273+ private async handleChooseDatabaseFolderFromPalette ( ) : Promise < void > {
274+ return withProgress (
275+ async ( progress , token ) => {
276+ await this . chooseDatabaseFolder ( progress , token ) ;
277+ } ,
278+ {
279+ title : "Choose a Database from a Folder" ,
280+ } ,
281+ ) ;
282+ }
283+
271284 private async handleSetDefaultTourDatabase ( ) : Promise < void > {
272285 return withProgress (
273286 async ( progress , token ) => {
You can’t perform that action at this time.
0 commit comments