MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / makeChildren

Method makeChildren

src/helpViewer/treeView.ts:424–448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

422 }
423
424 async makeChildren() {
425 let packages = await this.wrapper.rHelp.packageManager.getPackages(false);
426
427 if(!packages){
428 return [];
429 }
430
431 if(this.filterText){
432 const re = new RegExp(this.filterText);
433 packages = packages.filter(pkg => re.exec(pkg.name));
434 }
435
436 // favorites at the top
437 const children = packages.filter(pkg => pkg.isFavorite);
438
439 // nonFavorites below (if shown)
440 if(!this.showOnlyFavorites){
441 children.push(...packages.filter(pkg => !pkg.isFavorite));
442 }
443
444 // make packageNode for each child
445 return children.map(
446 pkg => new PackageNode(this, pkg)
447 );
448 }
449}
450
451

Callers

nothing calls this directly

Calls 1

getPackagesMethod · 0.80

Tested by

no test coverage detected