@@ -4,18 +4,15 @@ import {
44 window as Window ,
55 ViewColumn ,
66 Uri ,
7- workspace ,
8- extensions ,
9- commands ,
7+ workspace
108} from 'vscode' ;
119import * as path from 'path' ;
1210
1311import {
1412 ToRemoteQueriesMessage ,
1513 FromRemoteQueriesMessage ,
1614 RemoteQueryDownloadAnalysisResultsMessage ,
17- RemoteQueryDownloadAllAnalysesResultsMessage ,
18- RemoteQueryViewAnalysisResultsMessage ,
15+ RemoteQueryDownloadAllAnalysesResultsMessage
1916} from '../pure/interface-types' ;
2017import { Logger } from '../logging' ;
2118import { getHtmlForWebview } from '../interface-utils' ;
@@ -204,9 +201,6 @@ export class RemoteQueriesInterfaceManager {
204201 case 'remoteQueryDownloadAllAnalysesResults' :
205202 await this . downloadAllAnalysesResults ( msg ) ;
206203 break ;
207- case 'remoteQueryViewAnalysisResults' :
208- await this . viewAnalysisResults ( msg ) ;
209- break ;
210204 default :
211205 assertNever ( msg ) ;
212206 }
@@ -225,31 +219,6 @@ export class RemoteQueriesInterfaceManager {
225219 results => this . setAnalysisResults ( results ) ) ;
226220 }
227221
228- private async viewAnalysisResults ( msg : RemoteQueryViewAnalysisResultsMessage ) : Promise < void > {
229- const downloadLink = msg . analysisSummary . downloadLink ;
230- const filePath = path . join ( this . analysesResultsManager . storagePath , downloadLink . queryId , downloadLink . id , downloadLink . innerFilePath || '' ) ;
231-
232- const sarifViewerExtensionId = 'MS-SarifVSCode.sarif-viewer' ;
233-
234- const sarifExt = extensions . getExtension ( sarifViewerExtensionId ) ;
235- if ( ! sarifExt ) {
236- // Ask the user if they want to install the extension to view the results.
237- void commands . executeCommand ( 'workbench.extensions.installExtension' , sarifViewerExtensionId ) ;
238- return ;
239- }
240-
241- if ( ! sarifExt . isActive ) {
242- await sarifExt . activate ( ) ;
243- }
244-
245- // Clear any previous results before showing new results
246- await sarifExt . exports . closeAllLogs ( ) ;
247-
248- await sarifExt . exports . openLogs ( [
249- Uri . file ( filePath ) ,
250- ] ) ;
251- }
252-
253222 public async setAnalysisResults ( analysesResults : AnalysisResults [ ] ) : Promise < void > {
254223 if ( this . panel ?. active ) {
255224 await this . postMessage ( {
0 commit comments