@@ -70,7 +70,7 @@ export class TemplateQueryDefinitionProvider implements vscode.DefinitionProvide
7070 }
7171
7272 async getDefinitions ( uriString : string ) : Promise < vscode . LocationLink [ ] > {
73- return getLinksForUriString ( this . cli , this . qs , this . dbm , uriString , ( src , _dest ) => src === uriString ) ;
73+ return getLinksForUriString ( this . cli , this . qs , this . dbm , uriString , KeyType . DefinitionQuery , ( src , _dest ) => src === uriString ) ;
7474 }
7575
7676 async provideDefinition ( document : vscode . TextDocument , position : vscode . Position , _token : vscode . CancellationToken ) : Promise < vscode . LocationLink [ ] > {
@@ -97,7 +97,7 @@ export class TemplateQueryReferenceProvider implements vscode.ReferenceProvider
9797 }
9898
9999 async getReferences ( uriString : string ) : Promise < FullLocationLink [ ] > {
100- return getLinksForUriString ( this . cli , this . qs , this . dbm , uriString , ( _src , dest ) => dest === uriString ) ;
100+ return getLinksForUriString ( this . cli , this . qs , this . dbm , uriString , KeyType . ReferenceQuery , ( _src , dest ) => dest === uriString ) ;
101101 }
102102
103103 async provideReferences ( document : vscode . TextDocument , position : vscode . Position , _context : vscode . ReferenceContext , _token : vscode . CancellationToken ) : Promise < vscode . Location [ ] > {
@@ -146,6 +146,7 @@ async function getLinksForUriString(
146146 qs : QueryServerClient ,
147147 dbm : DatabaseManager ,
148148 uriString : string ,
149+ keyType : KeyType ,
149150 filter : ( src : string , dest : string ) => boolean
150151) {
151152 const uri = decodeSourceArchiveUri ( vscode . Uri . parse ( uriString ) ) ;
@@ -158,7 +159,7 @@ async function getLinksForUriString(
158159 throw new Error ( "Can't infer qlpack from database source archive" ) ;
159160 }
160161 const links : FullLocationLink [ ] = [ ]
161- for ( const query of await resolveQueries ( cli , qlpack , KeyType . ReferenceQuery ) ) {
162+ for ( const query of await resolveQueries ( cli , qlpack , keyType ) ) {
162163 const templates : messages . TemplateDefinitions = {
163164 [ TEMPLATE_NAME ] : {
164165 values : {
0 commit comments