Add context menu to copy path as Rascal source location from explorer view#692
Merged
DavyLandman merged 4 commits intomainfrom Aug 18, 2025
Merged
Add context menu to copy path as Rascal source location from explorer view#692DavyLandman merged 4 commits intomainfrom
DavyLandman merged 4 commits intomainfrom
Conversation
Member
|
As this goes a bit against the VS Code UX guidelines to not "Show actions for every file without context" I would like to:
|
1463b77 to
40a1bcb
Compare
40a1bcb to
fa2345a
Compare
Member
Author
|
Updated, as per @DavyLandman his suggestions: |
Member
|
@jurgenvinju what do you think of this feature? |
DavyLandman
reviewed
Aug 14, 2025
Member
Author
|
The groups are document here:
https://code.visualstudio.com/api/references/contribution-points#Sorting-of-groups
I determined the position 21 is the first position that places this item
directly beneath `Copy Relative Path` (which probably has index 20). I
think `Copy Path` has index 10, and they left some room in between. I don't
think we get many guarantees about this order otherwise, since other
extensions could contribute menu items here as well.
…On Thu, Aug 14, 2025 at 11:43 AM Davy Landman ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In rascal-vscode-extension/package.json
<#692 (comment)>
:
> @@ -67,6 +76,12 @@
"when": "view == rascalmpl-debugger-view && viewItem == 'canStartDebugging'",
"group": "inline"
}
+ ],
+ "explorer/context": [
+ {
+ "command": "rascalmpl.copySourceLocation",
+ "group": ***@***.***"
this looks very finicky, do we know the guarantees around this group name?
—
Reply to this email directly, view it on GitHub
<#692 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHW4A5ZRJB4XECLNT3A5P33NRK45AVCNFSM6AAAAACDCN2X4SVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTCMJZHA4DEMRRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Member
|
Ah right, it's a pitty JSON doesn't allow for comments. |
Member
|
jurgenvinju
approved these changes
Aug 18, 2025
Member
|
Yes, but #283 is more complex, due to the different offsets/columns between VS Code and rascal. Let's pick that up at a later point. |
|
rodinaarssen
pushed a commit
that referenced
this pull request
Aug 20, 2025
… view (#692) * Add context menu to copy loc from explorer. * Better name and location in context menu. * Hide copy-as-loc in command palette.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Closes #106