question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Go to symbol in Editor should have a way to include inheritted symbols

See original GitHub issue

One piece of functionality that would be nice to have with VS Code Java is the ability to quickly see all inherited methods of a class that is opened. I can see the ones it declares only. The closest existing functionality would be the Go to symbol in Editor command. This is often useful when exploring some class that has a deeper inheritance structure.

Eclipse has this behaviour through the Quick Outline (<ctrl> + o), when triggered twice, which will additionally show all members that are inherited by the opened type. The outline takes into account cursor positions so it can show an outline for nested classes while completely ignoring the other elements in the document.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
gayanpercommented, Jul 18, 2022

Yes thats what i found as well. So may be this could be presented in the reference-view which is used for type hierarchy and call hierarchy as well ?

The reason i thought like that is, from vscode design language it seems document symbol is just to view the symbols in the current document, a quick access to outline. So showing symbols in the super classes seems to be out of scope of this design language.

So may be looking at the class hierarchy with its symbols should be different feature and since its important for java (at least since most of the java IDEs has it) we could implement is as a view.

Its like super type hierarchy with symbols kind of a view.

WDYT @rgrunber ?

0reactions
gayanpercommented, Jul 20, 2022

This might be a preference, but I have always found ctr + o + type immediately in the search filter + <Enter> to be faster/preferrable to using the outline view and clicking on the symbol. Maybe because I never liked the amount of space the outline view takes from the editor. With that said, you’re right, that the outline view should also be changed, so maybe we can start with that for now.

Not sure if you misunderstood me in my previous comment. I think for vscode outline also we cannot distinguish if the documentSymbol call is from outline or quick access popup right ? The outline will ask the symbol information hierarchically and we can use that as a hint. I was suggesting to present this in the reference view which is added from vscode-java. But did you had something else in mind ?

Also, I think those developing language servers that have a notation of “includes” directives would run into the same issue. They’d want to display some symbols that are in a separate document as being part of the current one. So that’s what makes me think that the “documentSymbols” concept is going to have to evolve eventually.

Yes we can raise a improvement for LSP project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Go to Derived Symbols | ReSharper Documentation - JetBrains
This command gets the list of all derived symbols for a type or a member and lets you navigate directly to one of...
Read more >
Symbol Library Field Inheritance - Developer Announcements
Symbols that do not derive from other symbols (root symbols) are used as is. If a field is defined in the parent symbol...
Read more >
visual studio - What does this icon mean in VS2019?
This icon shows the inheritance chain/margin and was added in version 16.10 of Visual Studio. From the 16.10 release notes for Visual Studio ......
Read more >
Go to Implementation - Help | ReSharper - JetBrains
If the symbol has several implementation, they will be listed in a drop-down. The list may contain items in both bold and regular...
Read more >
Use tools windows to view code structure - Visual Studio ...
Learn how to use the Class View, Call Hierarchy, Object Browser, and Code ... find symbol references, and more, without having to switch ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found