File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { CodeQLCliServer } from "./cli" ;
2- import type { Uri } from "vscode" ;
2+ import type { CancellationToken , Uri } from "vscode" ;
33import { window } from "vscode" ;
44import {
55 getLanguageDisplayName ,
@@ -50,6 +50,7 @@ export async function findLanguage(
5050export async function askForLanguage (
5151 cliServer : CodeQLCliServer ,
5252 throwOnEmpty = true ,
53+ token ?: CancellationToken ,
5354) : Promise < QueryLanguage | undefined > {
5455 const supportedLanguages = await cliServer . getSupportedLanguages ( ) ;
5556
@@ -62,10 +63,14 @@ export async function askForLanguage(
6263 } ) )
6364 . sort ( ( a , b ) => a . label . localeCompare ( b . label ) ) ;
6465
65- const selectedItem = await window . showQuickPick ( items , {
66- placeHolder : "Select target query language" ,
67- ignoreFocusOut : true ,
68- } ) ;
66+ const selectedItem = await window . showQuickPick (
67+ items ,
68+ {
69+ placeHolder : "Select target query language" ,
70+ ignoreFocusOut : true ,
71+ } ,
72+ token ,
73+ ) ;
6974 if ( ! selectedItem ) {
7075 // This only happens if the user cancels the quick pick.
7176 if ( throwOnEmpty ) {
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ export class VariantAnalysisManager
229229 message : "Determining query language" ,
230230 } ) ;
231231
232- const language = await askForLanguage ( this . cliServer ) ;
232+ const language = await askForLanguage ( this . cliServer , true , token ) ;
233233 if ( ! language ) {
234234 return ;
235235 }
You can’t perform that action at this time.
0 commit comments