88 ProgressLocation ,
99 ProgressOptions ,
1010 Uri ,
11+ // workspace,
1112 window as Window ,
1213 env ,
1314 window ,
@@ -20,6 +21,7 @@ import { testExplorerExtensionId, TestHub } from 'vscode-test-adapter-api';
2021
2122import { AstViewer } from './astViewer' ;
2223import * as archiveFilesystemProvider from './archive-filesystem-provider' ;
24+ import MyCodeLensProvider from './CodelensProvider' ;
2325import { CodeQLCliServer , CliVersionConstraint } from './cli' ;
2426import {
2527 CliConfigListener ,
@@ -154,6 +156,23 @@ export interface CodeQLExtensionInterface {
154156 * @returns CodeQLExtensionInterface
155157 */
156158export async function activate ( ctx : ExtensionContext ) : Promise < CodeQLExtensionInterface | Record < string , never > > {
159+
160+ const codelensProvider = new MyCodeLensProvider ( ) ;
161+
162+ languages . registerCodeLensProvider ( '*' , codelensProvider ) ;
163+
164+ // commands.registerCommand('codelens-sample.enableCodeLens', () => {
165+ // void workspace.getConfiguration('codelens-sample').update('enableCodeLens', true, true);
166+ // });
167+
168+ // commands.registerCommand('codelens-sample.disableCodeLens', () => {
169+ // void workspace.getConfiguration('codelens-sample').update('enableCodeLens', false, true);
170+ // });
171+
172+ // commands.registerCommand('codelens-sample.codelensAction', (args: any) => {
173+ // void window.showInformationMessage(`CodeLens action clicked with args=${args}`);
174+ // });
175+
157176 void logger . log ( `Starting ${ extensionId } extension` ) ;
158177 if ( extension === undefined ) {
159178 throw new Error ( `Can't find extension ${ extensionId } ` ) ;
@@ -461,6 +480,7 @@ async function activateWithInstalledDistribution(
461480 forceReveal : WebviewReveal
462481 ) : Promise < void > {
463482 await intm . showResults ( query , forceReveal , false ) ;
483+ console . log ( query . query . quickEvalPosition ) ;
464484 }
465485
466486 async function compileAndRunQuery (
0 commit comments