File tree 2 files changed +18
-4
lines changed 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.
58
58
- Fix the automatic upgrading of CodeQL databases when using upgrade scripts from the workspace.
59
59
- Allow removal of items from the CodeQL Query History view.
60
60
61
-
62
61
## 1.0.0 - 14 November 2019
63
62
64
63
Initial 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';
5
5
import { QueryHistoryConfig } from './config' ;
6
6
import { QueryWithResults } from './run-queries' ;
7
7
import * as helpers from './helpers' ;
8
+ import { logger } from './logging' ;
8
9
9
10
/**
10
11
* query-history.ts
@@ -191,12 +192,26 @@ export class QueryHistoryManager {
191
192
192
193
async handleShowQueryLog ( queryHistoryItem : CompletedQuery ) {
193
194
if ( queryHistoryItem . logFileLocation ) {
195
+ const uri = vscode . Uri . parse ( queryHistoryItem . logFileLocation ) ;
194
196
try {
195
- await vscode . window . showTextDocument ( vscode . Uri . parse ( queryHistoryItem . logFileLocation ) , {
196
- viewColumn : vscode . ViewColumn . Beside
197
+ await vscode . window . showTextDocument ( uri , {
197
198
} ) ;
198
199
} 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
+
200
215
}
201
216
} else {
202
217
helpers . showAndLogWarningMessage ( 'No log file available' ) ;
You can’t perform that action at this time.
0 commit comments