Support for adding new SQLCMD variables to a project (#12009)

This commit is contained in:
Kim Santiago
2020-09-02 11:22:36 -07:00
committed by GitHub
parent 2d33c8dd82
commit f174dc1c77
8 changed files with 285 additions and 58 deletions

View File

@@ -8,7 +8,7 @@ import * as path from 'path';
import { DataSourcesTreeItem } from './dataSourceTreeItem';
import { BaseProjectTreeItem } from './baseTreeItem';
import * as fileTree from './fileFolderTreeItem';
import { Project, ProjectEntry, EntryType } from '../project';
import { Project, EntryType, FileProjectEntry } from '../project';
import * as utils from '../../common/utils';
import { DatabaseReferencesTreeItem } from './databaseReferencesTreeItem';
import { DatabaseProjectItemType, RelativeOuterPath } from '../../common/constants';
@@ -92,7 +92,7 @@ export class ProjectRootTreeItem extends BaseProjectTreeItem {
/**
* Gets the immediate parent tree node for an entry in a project file
*/
private getEntryParentNode(entry: ProjectEntry): fileTree.FolderNode | ProjectRootTreeItem {
private getEntryParentNode(entry: FileProjectEntry): fileTree.FolderNode | ProjectRootTreeItem {
const relativePathParts = utils.trimChars(utils.trimUri(vscode.Uri.file(this.project.projectFilePath), entry.fsUri), '/').split('/').slice(0, -1); // remove the last part because we only care about the parent
if (relativePathParts.length === 0) {