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 an ability to go to super class/method #1416

Closed
tgodzik opened this issue Jan 12, 2020 · 2 comments · Fixed by #1487
Closed

Add an ability to go to super class/method #1416

tgodzik opened this issue Jan 12, 2020 · 2 comments · Fixed by #1487
Assignees
Labels
feature-request Used for feature requests
Milestone

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Jan 12, 2020

Is your feature request related to a problem? Please describe.
This is well know feature that might be useful for a lot of users.

Describe the solution you'd like
We already look recursively to find the top class in the ImplementationProvider, we could reuse to just go one level up.

This could be implemented using code lenses although still not sure how it should look exactly.

If anyone is interested in contributing this feature please let me know.

Describe alternatives you've considered
Search by hand

Additional context
Suggested by @olafurpg

Search terms:
Implementation super method class

@tgodzik tgodzik transferred this issue from scalameta/metals-feature-requests Feb 10, 2020
@tgodzik
Copy link
Contributor Author

tgodzik commented Feb 10, 2020

@KBochenek is taking a look at this! 🎉

@tgodzik tgodzik added the feature-request Used for feature requests label Feb 10, 2020
@kpbochenek
Copy link
Contributor

UI considerations:

Screenshot 2020-02-12 at 12 35 48

^^ This is how it could look like

Even though you can specify a Range in a line where codeLens should be displayed it is always aligned to left. Multiple codeLenses are separated by "|" and aligned to left.
That's why for now I added method name to codelens.

Implementations considerations:
find the top class in the ImplementationProvider works only for methods/fields, for classes it needs to be changed or implemented separately. Actually for classes it might be much easier, just jump to parent from semanticdb.

Definitely might be cool to implement those methods to go to super method/class and allow user to bind them to keyboard shortcuts, not sure if this would not bloat UI too much with lenses?
Will try to attach screenshot with more realistic class

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

Successfully merging a pull request may close this issue.

2 participants