Creating a new database project, project items

* can create, open, and close sqlproj files
* can add sql objects to projects
This commit is contained in:
Benjin Dubishar
2020-04-17 14:09:59 -07:00
committed by GitHub
parent 05526bbaca
commit b3492e3f57
34 changed files with 1782 additions and 94 deletions

View File

@@ -50,7 +50,17 @@ export class FileNode extends BaseProjectTreeItem {
}
public get treeItem(): vscode.TreeItem {
return new vscode.TreeItem(this.uri, vscode.TreeItemCollapsibleState.None);
const treeItem = new vscode.TreeItem(this.uri, vscode.TreeItemCollapsibleState.None);
treeItem.command = {
title: 'Open file',
command: 'vscode.open',
arguments: [this.fileSystemUri]
};
treeItem.contextValue = 'File';
return treeItem;
}
}
@@ -58,7 +68,7 @@ export class FileNode extends BaseProjectTreeItem {
* Converts a full filesystem URI to a project-relative URI that's compatible with the project tree
*/
function fsPathToProjectUri(fileSystemUri: vscode.Uri, projectNode: ProjectRootTreeItem): vscode.Uri {
const projBaseDir = path.dirname(projectNode.project.projectFile);
const projBaseDir = path.dirname(projectNode.project.projectFilePath);
let localUri = '';
if (fileSystemUri.fsPath.startsWith(projBaseDir)) {