File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ hour for unauthenticated IPs.
5858- Fix the automatic upgrading of CodeQL databases when using upgrade scripts from the workspace.
5959- Allow removal of items from the CodeQL Query History view.
6060
61-
6261## 1.0.0 - 14 November 2019
6362
6463Initial release of CodeQL for Visual Studio Code.
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { CompletedQuery } from './query-results';
55import { QueryHistoryConfig } from './config' ;
66import { QueryWithResults } from './run-queries' ;
77import * as helpers from './helpers' ;
8+ import { logger } from './logging' ;
89
910/**
1011 * query-history.ts
@@ -191,12 +192,26 @@ export class QueryHistoryManager {
191192
192193 async handleShowQueryLog ( queryHistoryItem : CompletedQuery ) {
193194 if ( queryHistoryItem . logFileLocation ) {
195+ const uri = vscode . Uri . parse ( queryHistoryItem . logFileLocation ) ;
194196 try {
195- await vscode . window . showTextDocument ( vscode . Uri . parse ( queryHistoryItem . logFileLocation ) , {
196- viewColumn : vscode . ViewColumn . Beside
197+ await vscode . window . showTextDocument ( uri , {
197198 } ) ;
198199 } catch ( e ) {
199- helpers . showAndLogErrorMessage ( `Could not open log file ${ queryHistoryItem . logFileLocation } ` ) ;
200+ if ( e . message . includes ( 'Files above 50MB cannot be synchronized with extensions' ) ) {
201+ const res = await helpers . showBinaryChoiceDialog ( 'File is too large to open in the editor, do you want to open exterally?' ) ;
202+ if ( res ) {
203+ try {
204+ await vscode . commands . executeCommand ( 'revealFileInOS' , uri ) ;
205+ } catch ( e ) {
206+ helpers . showAndLogErrorMessage ( e . message ) ;
207+ }
208+ }
209+ } else {
210+ helpers . showAndLogErrorMessage ( `Could not open log file ${ queryHistoryItem . logFileLocation } ` ) ;
211+ logger . log ( e . message ) ;
212+ logger . log ( e . stack ) ;
213+ }
214+
200215 }
201216 } else {
202217 helpers . showAndLogWarningMessage ( 'No log file available' ) ;
You can’t perform that action at this time.
0 commit comments