class VolumeTreeItem extends TreeItem { constructor(volume) { super(volume.name, TreeItemCollapsibleState.None); this.identifier = volume.identifier; this.image = "icons/volume.png"; this.contextValue = "volume"; this.tooltip = volume.tooltip; // Volume images are sparse, so a size here would only mislead; the // capacity is in the tooltip instead. this.descriptiveText = [volume.driver, volume.filesystem] .filter((part) => part && part.length > 0) .join(" "); } } module.exports = { VolumeTreeItem };