-
Notifications
You must be signed in to change notification settings - Fork 5
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
Offer to 'Find all references' on overridden method #94
Comments
Thanks for reporting! This feature will be possible to implement once "rename symbol" is done. Currently, we are missing indexes to find all the overriden methods. |
👍 - linking to scalameta/metals#679 |
It is finally possible to find all references on an overridden method now, everything that we need is implemented and it's used in the Perhaps it would make sense to offer it via code actions ? |
@tgodzik what so you think about making it the default? |
I think that would be fine, but I would like to hear some more opinions. Overall, it would be also nice to be able to customize the options for finding references, so that we can do it both ways. |
I think it's fine to default to always finding references to all overridden and supermethods. I don't think we need to add options to begin with. |
Moving to the main repo since this issue is unblocked by textDocument/rename. |
yeah, only for |
Good point. We may want to special case |
Hi, is anyone currently working on this? If it's not too hard for a newcomer to the project, I'd like to give it a try :) |
Not currently, you're welcome to give it a try! We already try to find all references in the RenameProvider, which is done by going to the top symbol and searching for references of all implementations. This might probably be done better and we can move that logic to the ReferenceProvider. |
@kubukoz Are you working on this? Or is ok for someone else to pick it up? |
I'm not, got swamped with other commitments, sorry.
…On Mon, Feb 3, 2020, 10:59 Tomasz Godzik ***@***.***> wrote:
@kubukoz <https://github.com/kubukoz> Are you working on this? Or is ok
for someone else to pick it up?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/scalameta/metals/issues/1063?email_source=notifications&email_token=AAG2PJA7UGXVUCKPE3GKXGTRA7THHA5CNFSM4JMH4L52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKTGRZQ#issuecomment-581331174>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG2PJAQJATYM4OAFVIMB43RA7THHANCNFSM4JMH4L5Q>
.
|
We'll work on it with @KBochenek to get him introduced into Metals and overall Scalameta environment. |
This is blocked until we have a faster way to extract info about class hierarchy in dependencies. Looking into ways to do it here: scalameta/metals#1287 |
Moved it back to feature requests, since it will not be as easy to implement until we improve the efficiency of finding inheritance hierarchy in dependencies. |
By the way, this part of the OP has been implemented in scalameta/metals#1487 🎉 |
Is "find references for implementations of method" also in scope for this? |
@kubukoz that's the plan, however we still need a way to get class hierarchy from dependencies, which is not trivial to do effectively. |
Hi, any plans for supporting this? It seems that the previous blocker has been resolved by @kasiaMarek. |
We could probably do that now yeah, but not sure when. |
When doing a 'find all references' (in vscode) on a method that overrides a method from a superclass, only references to the method on the subclass are returned. It would be useful to have the option to also see references to the method on the superclass. Also easily jumping to the method in the superclass would be helpful.
The text was updated successfully, but these errors were encountered: