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
github-actions[bot] edited this page May 16, 2024
·
6 revisions
The 'custom' tree section, usually contributed by extensions as TreeView. All The behavior is defined by the general ViewSection class.
Lookup
import{SideBarView,CustomTreeSection}from'vscode-extension-tester';
...
// Type is inferred automatically, the type cast here is used to be more explicitconstsection=awaitnewSideBarView().getContent().getSection('servers')asCustomTreeSection;
Get Welcome Content
Some sections may provide a welcome content when their tree is empty.
// find welcome content, return undefined if not presentconstwelcome: WelcomeContentSection=awaitsection.findWelcomeContent();// get all the possible buttons and paragraphs in a listconstcontents=awaitwelcome.getContents();// get all buttonsconstbtns=awaitwelcome.getButtons();// get paragraphs as strings in a listconsttext=awaitwelcome.getTextSections();