File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,15 @@ export async function registerListDataResourcesCommand(context: ExtensionContext
31
31
* @param dataPackageUri Local (file:///) or remote/public (https://) data package uri.
32
32
*/
33
33
async function listDataResources ( dataPackageUri : Uri ) : Promise < void > {
34
+ if ( ! dataPackageUri && window . activeTextEditor &&
35
+ window . activeTextEditor . document . fileName . endsWith ( 'datapackage.json' ) ) {
36
+ // use active text editor document Uri
37
+ dataPackageUri = window . activeTextEditor . document . uri ;
38
+ }
39
+
34
40
// create data package url for loading package info and resource list
35
41
let dataPackageUrl : string = dataPackageUri . toString ( true ) ; // skip encoding
42
+ console . log ( 'tabular.data.package:Url:' , dataPackageUrl ) ;
36
43
if ( dataPackageUrl . startsWith ( 'file:///' ) ) {
37
44
// use fs path
38
45
dataPackageUrl = dataPackageUri . fsPath ;
You can’t perform that action at this time.
0 commit comments