@@ -21,7 +21,8 @@ import {
2121import * as helpers from './helpers' ;
2222import { assertNever } from './helpers-pure' ;
2323import { spawnIdeServer } from './ide-server' ;
24- import { InterfaceManager , WebviewReveal } from './interface' ;
24+ import { InterfaceManager } from './interface' ;
25+ import { WebviewReveal } from './webview-utils' ;
2526import { ideServerLogger , logger , queryServerLogger } from './logging' ;
2627import { QueryHistoryManager } from './query-history' ;
2728import { CompletedQuery } from './query-results' ;
@@ -30,6 +31,7 @@ import { displayQuickQuery } from './quick-query';
3031import { compileAndRunQueryAgainstDatabase , tmpDirDisposal , UserCancellationException } from './run-queries' ;
3132import { QLTestAdapterFactory } from './test-adapter' ;
3233import { TestUIService } from './test-ui' ;
34+ import { CompareInterfaceManager } from './compare/compare-interface' ;
3335
3436/**
3537 * extension.ts
@@ -303,14 +305,24 @@ async function activateWithInstalledDistribution(ctx: ExtensionContext, distribu
303305 const qhm = new QueryHistoryManager (
304306 ctx ,
305307 queryHistoryConfigurationListener ,
306- async item => showResultsForCompletedQuery ( item , WebviewReveal . Forced )
308+ async item => showResultsForCompletedQuery ( item , WebviewReveal . Forced ) ,
309+ async ( from : CompletedQuery , to : CompletedQuery ) => showResultsForComparison ( from , to , WebviewReveal . Forced ) ,
307310 ) ;
308311 logger . log ( 'Initializing results panel interface.' ) ;
309312 const intm = new InterfaceManager ( ctx , dbm , cliServer , queryServerLogger ) ;
310313 ctx . subscriptions . push ( intm ) ;
314+
315+ logger . log ( 'Initializing compare panel interface.' ) ;
316+ const cmpm = new CompareInterfaceManager ( ctx , dbm , cliServer , queryServerLogger ) ;
317+ ctx . subscriptions . push ( cmpm ) ;
318+
311319 logger . log ( 'Initializing source archive filesystem provider.' ) ;
312320 archiveFilesystemProvider . activate ( ctx ) ;
313321
322+ async function showResultsForComparison ( from : CompletedQuery , to : CompletedQuery , forceReveal : WebviewReveal ) : Promise < void > {
323+ await cmpm . showResults ( from , to , forceReveal ) ;
324+ }
325+
314326 async function showResultsForCompletedQuery ( query : CompletedQuery , forceReveal : WebviewReveal ) : Promise < void > {
315327 await intm . showResults ( query , forceReveal , false ) ;
316328 }
0 commit comments