mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fix table designer error when sql project has folders (#19667)
* fix table designer error when sql project has folders * filter on .sql file extension * compare lowercase * add back EntryType.File filter
This commit is contained in:
@@ -20,6 +20,7 @@ import { GenerateProjectFromOpenApiSpecOptions, ItemType } from 'sqldbproj';
|
|||||||
import { TableFileNode } from '../models/tree/fileFolderTreeItem';
|
import { TableFileNode } from '../models/tree/fileFolderTreeItem';
|
||||||
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
import { ProjectRootTreeItem } from '../models/tree/projectTreeItem';
|
||||||
import { getAzdataApi } from '../common/utils';
|
import { getAzdataApi } from '../common/utils';
|
||||||
|
import { EntryType } from '../models/projectEntry';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main controller class that initializes the extension
|
* The main controller class that initializes the extension
|
||||||
@@ -102,7 +103,8 @@ export default class MainController implements vscode.Disposable {
|
|||||||
isNewTable: false,
|
isNewTable: false,
|
||||||
tableScriptPath: filePath,
|
tableScriptPath: filePath,
|
||||||
projectFilePath: projectPath,
|
projectFilePath: projectPath,
|
||||||
allScripts: projectNode.project.files.map(entry => entry.fsUri.fsPath),
|
allScripts: projectNode.project.files.filter(entry => entry.type === EntryType.File && path.extname(entry.fsUri.fsPath).toLowerCase() === constants.sqlFileExtension)
|
||||||
|
.map(entry => entry.fsUri.fsPath),
|
||||||
targetVersion: targetVersion
|
targetVersion: targetVersion
|
||||||
}, {
|
}, {
|
||||||
'ProjectTargetVersion': targetVersion
|
'ProjectTargetVersion': targetVersion
|
||||||
|
|||||||
Reference in New Issue
Block a user