Skip to content

Commit ae77c49

Browse files
committed
fix: add custom tooltip to INCLUDE_PATH DocumentLink to override default Execute Command tooltip
1 parent 98600ae commit ae77c49

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"url": "https://github.com/hqyyqh/vscode-lsdyna"
1212
},
1313
"icon": "images/LS_DYNA_geo_metro.png",
14-
"version": "3.0.4",
14+
"version": "3.0.5",
1515
"engines": {
1616
"vscode": "^1.50.0"
1717
},

src/extension.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,14 @@ function collectIncludeDocumentLinks(document) {
314314
encodeURIComponent(JSON.stringify([{ resourceUri: vscode.Uri.file(targetPath) }]))
315315
);
316316
return includeScanner.getIncludeEntryRanges(entry)
317-
.map(({ lineIndex, startChar, endLineIndex, endChar }) =>
318-
new vscode.DocumentLink(
317+
.map(({ lineIndex, startChar, endLineIndex, endChar }) => {
318+
const link = new vscode.DocumentLink(
319319
new vscode.Range(lineIndex, startChar, endLineIndex, endChar),
320320
targetUri
321-
)
322-
);
321+
);
322+
link.tooltip = i18n.get('revealInExplorer');
323+
return link;
324+
});
323325
} catch (e) {
324326
return [];
325327
}

0 commit comments

Comments
 (0)