Skip to content

Find method references of specific class instance #2478

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

Open
yaitskov opened this issue Dec 13, 2021 · 2 comments
Open

Find method references of specific class instance #2478

yaitskov opened this issue Dec 13, 2021 · 2 comments
Labels

Comments

@yaitskov
Copy link

yaitskov commented Dec 13, 2021

VSCode has menu item "Go to references". Applied to method instance it gives all places where method is mentioned, but don't filter by type for which instance is defined.
A few methods (such us parseJSON from Aeson FromJSON) could be used in many places.
So search produce a long list which doesn't help a lot.
The search option should have a constraint option taking into account type to make answer more relevant. All places calling parseJSON specify required type.

Instead of command: find all parseJSON invocations
Command: find all parseJSON @Foo invocations

@yaitskov
Copy link
Author

This kind of search involves call graph analysis which is not always possible.
Result reference list should have sub groups: definitely and probably.

@michaelpj
Copy link
Collaborator

This is made much more complicated by polymorphism: is parseJSON @a a reference to parseJSON @Foo? It could be!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants