mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
async loading children
This commit is contained in:
@@ -46,4 +46,15 @@ export class ExtHostExplorers extends ExtHostExplorersShape {
|
||||
return JSON.stringify(treeContent);
|
||||
}));
|
||||
}
|
||||
|
||||
$resolveChildren(treeContentProviderId: string, node: vscode.ITreeNode): TPromise<string> {
|
||||
const provider = this._treeContentProviders[treeContentProviderId];
|
||||
if (!provider) {
|
||||
throw new Error(`no TreeContentProvider registered with id '${treeContentProviderId}'`);
|
||||
}
|
||||
|
||||
return TPromise.wrap(provider.resolveChildren(node).then(children => {
|
||||
return JSON.stringify(children);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user