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 @@ -65,6 +65,7 @@ export type QueryHistoryCommands = {
6565export type LocalDatabasesCommands = {
6666 // Command palette commands
6767 "codeQL.chooseDatabaseFolder" : ( ) => Promise < void > ;
68+ "codeQL.chooseDatabaseArchive" : ( ) => Promise < void > ;
6869 "codeQL.upgradeCurrentDatabase" : ( ) => Promise < void > ;
6970 "codeQL.clearCache" : ( ) => Promise < void > ;
7071
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.chooseDatabaseArchive" ,
1226- ( progress : ProgressCallback , token : CancellationToken ) =>
1227- databaseUI . chooseDatabaseArchive ( progress , token ) ,
1228- {
1229- title : "Choose a Database from an Archive" ,
1230- } ,
1231- ) ,
1232- ) ;
12331223 ctx . subscriptions . push (
12341224 commandRunnerWithProgress (
12351225 "codeQL.chooseDatabaseGithub" ,
Original file line number Diff line number Diff line change @@ -210,6 +210,8 @@ export class DatabaseUI extends DisposableObject {
210210 return {
211211 "codeQL.chooseDatabaseFolder" :
212212 this . handleChooseDatabaseFolderFromPalette . bind ( this ) ,
213+ "codeQL.chooseDatabaseArchive" :
214+ this . handleChooseDatabaseArchiveFromPalette . bind ( this ) ,
213215 "codeQL.setCurrentDatabase" : this . handleSetCurrentDatabase . bind ( this ) ,
214216 "codeQL.setDefaultTourDatabase" :
215217 this . handleSetDefaultTourDatabase . bind ( this ) ,
@@ -431,6 +433,17 @@ export class DatabaseUI extends DisposableObject {
431433 ) ;
432434 }
433435
436+ private async handleChooseDatabaseArchiveFromPalette ( ) : Promise < void > {
437+ return withProgress (
438+ async ( progress , token ) => {
439+ await this . chooseDatabaseArchive ( progress , token ) ;
440+ } ,
441+ {
442+ title : "Choose a Database from an Archive" ,
443+ } ,
444+ ) ;
445+ }
446+
434447 public async chooseDatabaseInternet (
435448 progress : ProgressCallback ,
436449 token : CancellationToken ,
You can’t perform that action at this time.
0 commit comments