Skip to content
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

Add hyperlinking for references #13

Closed
justint opened this issue Jul 29, 2020 · 0 comments
Closed

Add hyperlinking for references #13

justint opened this issue Jul 29, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@justint
Copy link
Owner

justint commented Jul 29, 2020

Asset/path references in USD files are currently colored blue and underlined, giving the impression that they are hyperlinks. Right now no linking behavior is implemented, but it would be great if one could Ctrl+Click on one and have the editor jump to the referenced path.


To implement this I'll need to define a Reference Contributor, which will provide the ability for the plug-in to jump from the usage of an element to its declaration. Implementing this in turn will open the door for getting the "Find usages"/"Refactor"/"Rename" functions available.

To define the reference element's "origin", I'll need to parse the reference path and identify which prim in the PSI tree it's referring to; if the reference also includes a path to an external usd file, I'll likely have to use usdresolve to find the path to the file (similar to how AnimalLogic's VSCode extension does it), parse its PSI tree, and then return the path to the prim in that file.

For defining references for overs or other structures that imply definition outside of the current file, that'll be a little more complicated. I'll likely need to teach the plug-in to check for reference definitions in the parent prim metadata and parse those referenced files' PSI trees for the def of the requested element.

@justint justint added the enhancement New feature or request label Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant