Scoping of project context menu items based on node type (#10902)

* Remove context menu items from files

* More changes for context menu and adding test

* change to initiate build
This commit is contained in:
Udeesha Gautam
2020-06-12 17:00:51 -07:00
committed by GitHub
parent 960aa14027
commit 70f65f45b5
8 changed files with 53 additions and 21 deletions

View File

@@ -11,6 +11,7 @@ import * as fileTree from './fileFolderTreeItem';
import { Project, ProjectEntry, EntryType } from '../project';
import * as utils from '../../common/utils';
import { DatabaseReferencesTreeItem } from './databaseReferencesTreeItem';
import { DatabaseProjectItemType } from '../../common/constants';
/**
* TreeNode root that represents an entire project
@@ -40,7 +41,9 @@ export class ProjectRootTreeItem extends BaseProjectTreeItem {
}
public get treeItem(): vscode.TreeItem {
return new vscode.TreeItem(this.uri, vscode.TreeItemCollapsibleState.Expanded);
const projectItem = new vscode.TreeItem(this.uri, vscode.TreeItemCollapsibleState.Expanded);
projectItem.contextValue = DatabaseProjectItemType.project;
return projectItem;
}
/**