-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adopt vscode.open
or vscode.diff
in built-in extensions
#110497
Comments
Debug had loaded scripts view, but it is now in the vscode core. So we should be covered there. |
We have some views in debug land but don't open sources from them. |
NPM involves opening package.json files and finding specific scripts in them. Adopting |
@alexr00 can you clarify? at the time I have expanded the NPM tree to see scripts, we should have already resolved everything, no? |
The view uses |
It probably should be refactored that way since it will be more efficient then. |
After a quick check, I think the only blocker is this code: vscode/extensions/npm/src/npmView.ts Line 198 in 7b5849b
If the position was known upfront, this could be changed from: vscode/extensions/npm/src/npmView.ts Lines 82 to 86 in 7b5849b
to something like: 'open': {
title: 'Edit Script',
command: 'vscode.open',
arguments: [uri, selection]
} |
That is correct. I don't want to go and open every package.json multiple times up front, so the extension will need to be refactored to determine the line number up front. |
@connor4312 and @jrieken FYI I have made a test plan item for NPM scripts, but we will still need test items for the other extensions. |
I have a verificated-needed item for this |
I had this for my #111417 already spelled out, but having individual issues for each extension makes more sense to me: Maybe I leave my thing in for SCM at least (@joaomoreno fyi) |
Ok good then I will simply remove that part from my test plan item, thanks for covering it in other issues 👍 |
With #85636 landed, it is now recommended that an extension sets the
TreeItem
command tovscode.open
orvscode.diff
if the resource is know upfront.Example from ref view:
https://github.com/microsoft/vscode-references-view/blob/730800271aa5ef52b1c49608d68f14ee585f7821/src/calls/model.ts#L176-L186
List of extensions with custom views we ship:
Git support is tracked in #110397 and timeline in #110496
//cc @isidorn @weinand not sure if debug has custom views where we should support this as well?
The text was updated successfully, but these errors were encountered: