Implement select command for tree views

This commit is contained in:
Sandeep Somavarapu
2017-05-11 17:57:54 +02:00
parent cd6685c06b
commit 625ce8fe28
3 changed files with 12 additions and 4 deletions

View File

@@ -73,9 +73,11 @@ class TreeExplorerNodeProvider implements IExplorerViewDataProvider<ITreeNode> {
return node.contextKey;
}
executeCommand(node: ITreeNode): TPromise<any> {
return this._proxy.$getInternalCommand(this.id, node).then(command => {
return this.commandService.executeCommand(command.id, ...command.arguments);
select(node: ITreeNode): void {
this._proxy.$getInternalCommand(this.id, node).then(command => {
if (command) {
this.commandService.executeCommand(command.id, ...command.arguments);
}
});
}
}