mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 01:25:37 -05:00
Connection Browse Tab (#12222)
* add browse tab and flat tree provider for azure * fix tests * add comment * fix build errors * fix test cases Co-authored-by: Alan Ren <alanren@microsoft.com>
This commit is contained in:
@@ -197,9 +197,11 @@ export class TreeNodeRenderer implements ITreeRenderer<TreeNode, FuzzyScore, Tre
|
||||
renderTemplate(container: HTMLElement): TreeNodeTemplate {
|
||||
return this._instantiationService.createInstance(TreeNodeTemplate, container);
|
||||
}
|
||||
|
||||
renderElement(node: ITreeNode<TreeNode, FuzzyScore>, index: number, template: TreeNodeTemplate): void {
|
||||
template.set(node.element);
|
||||
}
|
||||
|
||||
disposeTemplate(templateData: TreeNodeTemplate): void {
|
||||
templateData.dispose();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export enum TreeItemCollapsibleState {
|
||||
}
|
||||
|
||||
export interface ObjectExplorerCallbacks {
|
||||
getChildren(treeNode?: TreeNode): Thenable<TreeNode[]>;
|
||||
getChildren(treeNode?: TreeNode): Promise<TreeNode[]>;
|
||||
isExpanded(treeNode: TreeNode): Thenable<boolean>;
|
||||
setNodeExpandedState(TreeNode: TreeNode, expandedState: TreeItemCollapsibleState): Thenable<void>;
|
||||
setNodeSelected(TreeNode: TreeNode, selected: boolean, clearOtherSelections?: boolean): Thenable<void>;
|
||||
@@ -160,7 +160,7 @@ export class TreeNode {
|
||||
};
|
||||
}
|
||||
|
||||
public getChildren(): Thenable<TreeNode[]> {
|
||||
public getChildren(): Promise<TreeNode[]> {
|
||||
return this._objectExplorerCallbacks?.getChildren(this) ?? Promise.resolve([]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user