Add tooltip for setting file and use base name

Signed-off-by: Sanjula Ganepola <sanjulagane@gmail.com>
This commit is contained in:
Sanjula Ganepola
2024-11-21 21:50:51 -05:00
parent 049b6bdc8f
commit db7972e887
2 changed files with 3 additions and 1 deletions

View File

@@ -15,6 +15,8 @@ export default class SettingFileTreeItem extends TreeItem implements GithubLocal
this.contextValue = treeItem.contextValue;
this.iconPath = treeItem.iconPath;
this.checkboxState = settingFile.selected ? TreeItemCheckboxState.Checked : TreeItemCheckboxState.Unchecked;
this.tooltip = `Name: ${settingFile.name}\n` +
`Path: ${settingFile.path}\n`;
}
static getSecretTreeItem(workspaceFolder: WorkspaceFolder, secretFile: SettingFile): SettingFileTreeItem {

View File

@@ -41,7 +41,7 @@ export default class SettingsTreeDataProvider implements TreeDataProvider<Github
existingSettingFileNames.push(settingFileName);
} else {
const newSettingFile: SettingFile = {
name: path.parse(uri.fsPath).name,
name: path.parse(uri.fsPath).base,
path: uri.fsPath,
selected: false
};