You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Into BranchDataProvider I register each child in TreeElementStateManager
exportclassBranchDataProviderextendsvscode.DisposableimplementsBranchDataProvider<CosmosDBResource,TreeElementWithId>{privatereadonlyonDidChangeTreeDataEmitter=newvscode.EventEmitter<TreeElementWithId|undefined>();constructor(){super(()=>this.onDidChangeTreeDataEmitter.dispose());}getonDidChangeTreeData(): vscode.Event<TreeElementWithId|undefined>{returnthis.onDidChangeTreeDataEmitter.event;}asyncgetChildren(element: TreeElementWithId): Promise<TreeElementWithId[]>{try{constresult=awaitcallWithTelemetryAndErrorHandling('',async(context: IActionContext)=>{constchildren=(awaitelement.getChildren?.())??[];returnchildren.map((child)=>{returnext.state.wrapItemInStateHandling(child,(child: TreeElementWithId)=>this.refresh(child),)asTreeElementWithId;// THIS FUNCTION CREATES WRAPPED OBJECT with branchItem});},);returnresult??[];}catch(error){}}asyncgetResourceItem(resource: CosmosDBResource): Promise<TreeElementWithId>{}asyncgetTreeItem(element: TreeElementWithId): Promise<vscode.TreeItem>{returnelement.getTreeItem();}refresh(element?: TreeElementWithId): void{this.onDidChangeTreeDataEmitter.fire(element);}}
When I call a command azureDatabases.refresh the method registerCommand tries to take contextValue. However, due to wrapped object which does not contain contextValue the getTreeItem() calls even if branchItem (real node instance) has this property
Then the method refreshTreeElement calls refreshing the node and getTreeItem calls again (twice)
The text was updated successfully, but these errors were encountered:
Into
BranchDataProvider
I register each child in TreeElementStateManagerazureDatabases.refresh
the methodregisterCommand
tries to takecontextValue
. However, due to wrapped object which does not containcontextValue
thegetTreeItem()
calls even if branchItem (real node instance) has this propertyrefreshTreeElement
calls refreshing the node andgetTreeItem
calls again (twice)The text was updated successfully, but these errors were encountered: