1- import { DisposableObject } from "semmle -vscode-utils" ;
1+ import { DisposableObject } from '@github/codeql -vscode-utils' ;
22import {
33 WebviewPanel ,
44 ExtensionContext ,
55 window as Window ,
66 ViewColumn ,
77 Uri ,
8- } from " vscode" ;
9- import * as path from " path" ;
8+ } from ' vscode' ;
9+ import * as path from ' path' ;
1010
11- import { tmpDir } from " ../run-queries" ;
12- import { CompletedQuery } from " ../query-results" ;
11+ import { tmpDir } from ' ../run-queries' ;
12+ import { CompletedQuery } from ' ../query-results' ;
1313import {
1414 FromCompareViewMessage ,
1515 ToCompareViewMessage ,
1616 QueryCompareResult ,
17- } from " ../interface-types" ;
18- import { Logger } from " ../logging" ;
19- import { CodeQLCliServer } from " ../cli" ;
20- import { DatabaseManager } from " ../databases" ;
21- import { getHtmlForWebview , jumpToLocation } from " ../interface-utils" ;
22- import { adaptSchema , adaptBqrs , RawResultSet } from " ../adapt" ;
23- import { BQRSInfo } from " ../bqrs-cli-types" ;
24- import resultsDiff from " ./resultsDiff" ;
17+ } from ' ../interface-types' ;
18+ import { Logger } from ' ../logging' ;
19+ import { CodeQLCliServer } from ' ../cli' ;
20+ import { DatabaseManager } from ' ../databases' ;
21+ import { getHtmlForWebview , jumpToLocation } from ' ../interface-utils' ;
22+ import { adaptSchema , adaptBqrs , RawResultSet } from ' ../adapt' ;
23+ import { BQRSInfo } from ' ../bqrs-cli-types' ;
24+ import resultsDiff from ' ./resultsDiff' ;
2525
2626interface ComparePair {
2727 from : CompletedQuery ;
@@ -67,7 +67,7 @@ export class CompareInterfaceManager extends DisposableObject {
6767 ) ;
6868 if ( currentResultSetName ) {
6969 await this . postMessage ( {
70- t : " setComparisons" ,
70+ t : ' setComparisons' ,
7171 stats : {
7272 fromQuery : {
7373 // since we split the description into several rows
@@ -100,16 +100,16 @@ export class CompareInterfaceManager extends DisposableObject {
100100 if ( this . panel == undefined ) {
101101 const { ctx } = this ;
102102 const panel = ( this . panel = Window . createWebviewPanel (
103- " compareView" ,
104- " Compare CodeQL Query Results" ,
103+ ' compareView' ,
104+ ' Compare CodeQL Query Results' ,
105105 { viewColumn : ViewColumn . Active , preserveFocus : true } ,
106106 {
107107 enableScripts : true ,
108108 enableFindWidget : true ,
109109 retainContextWhenHidden : true ,
110110 localResourceRoots : [
111111 Uri . file ( tmpDir . name ) ,
112- Uri . file ( path . join ( this . ctx . extensionPath , " out" ) ) ,
112+ Uri . file ( path . join ( this . ctx . extensionPath , ' out' ) ) ,
113113 ] ,
114114 }
115115 ) ) ;
@@ -123,11 +123,11 @@ export class CompareInterfaceManager extends DisposableObject {
123123 ) ;
124124
125125 const scriptPathOnDisk = Uri . file (
126- ctx . asAbsolutePath ( " out/compareView.js" )
126+ ctx . asAbsolutePath ( ' out/compareView.js' )
127127 ) ;
128128
129129 const stylesheetPathOnDisk = Uri . file (
130- ctx . asAbsolutePath ( " out/resultsView.css" )
130+ ctx . asAbsolutePath ( ' out/resultsView.css' )
131131 ) ;
132132
133133 panel . webview . html = getHtmlForWebview (
@@ -158,21 +158,21 @@ export class CompareInterfaceManager extends DisposableObject {
158158 msg : FromCompareViewMessage
159159 ) : Promise < void > {
160160 switch ( msg . t ) {
161- case " compareViewLoaded" :
161+ case ' compareViewLoaded' :
162162 this . panelLoaded = true ;
163163 this . panelLoadedCallBacks . forEach ( ( cb ) => cb ( ) ) ;
164164 this . panelLoadedCallBacks = [ ] ;
165165 break ;
166166
167- case " changeCompare" :
167+ case ' changeCompare' :
168168 this . changeTable ( msg . newResultSetName ) ;
169169 break ;
170170
171- case " viewSourceFile" :
171+ case ' viewSourceFile' :
172172 await jumpToLocation ( msg , this . databaseManager , this . logger ) ;
173173 break ;
174174
175- case " openQuery" :
175+ case ' openQuery' :
176176 await this . openQuery ( msg . kind ) ;
177177 break ;
178178 }
@@ -193,10 +193,10 @@ export class CompareInterfaceManager extends DisposableObject {
193193 const toSchemas = await this . cliServer . bqrsInfo (
194194 to . query . resultsPaths . resultsPath
195195 ) ;
196- const fromSchemaNames = fromSchemas [ " result-sets" ] . map (
196+ const fromSchemaNames = fromSchemas [ ' result-sets' ] . map (
197197 ( schema ) => schema . name
198198 ) ;
199- const toSchemaNames = toSchemas [ " result-sets" ] . map (
199+ const toSchemaNames = toSchemas [ ' result-sets' ] . map (
200200 ( schema ) => schema . name
201201 ) ;
202202 const commonResultSetNames = fromSchemaNames . filter ( ( name ) =>
@@ -238,7 +238,7 @@ export class CompareInterfaceManager extends DisposableObject {
238238 resultSetName : string ,
239239 resultsPath : string
240240 ) : Promise < RawResultSet > {
241- const schema = bqrsInfo [ " result-sets" ] . find (
241+ const schema = bqrsInfo [ ' result-sets' ] . find (
242242 ( schema ) => schema . name === resultSetName
243243 ) ;
244244 if ( ! schema ) {
@@ -260,9 +260,9 @@ export class CompareInterfaceManager extends DisposableObject {
260260 return resultsDiff ( fromResults , toResults ) ;
261261 }
262262
263- private openQuery ( kind : " from" | "to" ) {
263+ private openQuery ( kind : ' from' | 'to' ) {
264264 const toOpen =
265- kind === " from" ? this . comparePair ?. from : this . comparePair ?. to ;
265+ kind === ' from' ? this . comparePair ?. from : this . comparePair ?. to ;
266266 if ( toOpen ) {
267267 this . showQueryResultsCallback ( toOpen ) ;
268268 }
0 commit comments