From 1d359c0ac0db0cbc4ef348a05652df8c94551477 Mon Sep 17 00:00:00 2001 From: Makoto Kimura Date: Mon, 21 Oct 2024 22:34:50 +0900 Subject: [PATCH] Open Panel other than SQL files --- src/treeview_provider/modelTreeviewProvider.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/treeview_provider/modelTreeviewProvider.ts b/src/treeview_provider/modelTreeviewProvider.ts index 663fc8abe..e12fd9848 100755 --- a/src/treeview_provider/modelTreeviewProvider.ts +++ b/src/treeview_provider/modelTreeviewProvider.ts @@ -104,10 +104,9 @@ abstract class ModelTreeviewProvider if (element) { return Promise.resolve(this.getTreeItems(element.key, event)); } - const fileName = path.basename( + const fileName = path.parse( window.activeTextEditor!.document.fileName, - ".sql", - ); + ).name; const model = event.nodeMetaMap.lookupByBaseName(fileName); if (!model) { return Promise.resolve([]); @@ -222,10 +221,9 @@ class DocumentationTreeviewProvider implements TreeDataProvider { const { nodeMetaMap } = event; if (!element) { - const modelName = path.basename( + const modelName = path.parse( window.activeTextEditor!.document.fileName, - ".sql", - ); + ).name; const currentNode = nodeMetaMap.lookupByBaseName(modelName); if (currentNode === undefined) { return Promise.resolve([]);