File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -493,24 +493,19 @@ export class DataPreview {
493493 this . _panel . reveal ( this . _panel . viewColumn , true ) ; // preserve focus
494494 this . _status . show ( ) ;
495495 this . updateStatus ( 'Loading data...' ) ;
496-
497496 if ( dataTable . length > 0 ) {
498497 // save requested data table
499498 this . _dataTable = dataTable ;
500499 }
501-
502- // read and send updated data to webview
503- // workspace.openTextDocument(this.uri).then(document => {
504- this . _logger . debug ( `refresh(): \n dataTable: '${ this . _dataTable } ' \n dataUrl:` , this . _dataUrl ) ;
505- //const textData: string = document.getText();
506- try {
507- this . getData ( this . _uri . fsPath , this . _dataTable ) ; //this._dataUrl, this._dataTable);
508- }
509- catch ( error ) {
510- this . _logger . error ( `refresh(${ this . _dataTable } ): Error:\n` , error . message ) ;
511- this . webview . postMessage ( { error : error } ) ;
512- }
513- // });
500+ const dataUrl : string = ( this . _isRemoteData ) ? this . _dataUrl : this . _uri . fsPath ; // local data file path
501+ this . _logger . debug ( `refresh(): \n dataTable: '${ this . _dataTable } ' \n dataUrl:` , dataUrl ) ;
502+ try {
503+ this . getData ( dataUrl , this . _dataTable ) ;
504+ }
505+ catch ( error ) {
506+ this . _logger . error ( `refresh(${ this . _dataTable } ): Error:\n` , error . message ) ;
507+ this . webview . postMessage ( { error : error } ) ;
508+ }
514509 } // end of refresh()
515510
516511 /**
You can’t perform that action at this time.
0 commit comments