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

Provide outline and breadcrumbs for read-only (generated, decompiled) sources #6341

Closed
geekley opened this issue Sep 12, 2023 · 1 comment
Closed

Comments

@geekley
Copy link

geekley commented Sep 12, 2023

Is your feature request related to a problem? Please describe.

I'm always frustrated when browsing a generated C# code (such as decompiled code or code from source generators) and I can't simply find a method or property by name, unless I use the search feature.

The extension is able to syntax-color the code. I can even navigate further to definitions (except for a bug when the definition is in the same file, but I digress). It should also be able to parse it just enough to generate outline / breadcrumb items. It doesn't need full compilation, just parse the file itself (no need to consider external references) to provide a syntax tree.

Describe the solution you would like

Make the document symbol provider work for read-only/decompiled/generated code too. Then members of a class will be listed on outline and I can click on it to navigate. That will also provide breadcrumbs and let me jump to the member by @name in the command palette.

Applicable Scenarios

All C# development can benefit from this. You should always be able to just navigate any code conveniently.

Often I decompile open-source libraries (e.g. Godot) to browse code referenced in order to understand it, since documentation alone is very often not enough (and finding the actual source online is too much of a hassle). Specially the class you're inheriting from. Sometimes I just want to know which of the zillion inherited methods are from the immediate base class (btw, it would be much better if they would be grouped by defining class in Intellisense completions, but that's for another feature request).

That would also be useful for other read-only/generated code, such as the ones from source generators.

Describe alternatives you've considered

The only alternative is the insufferable search feature where you go Ctrl+F and type the method name and hope there's not a million mentions of that name in comments, method calls, etc. Or you type code somewhere and use go-to-definition. It's just very inconvenient.

Additional context

TL;DR: I'm requesting this provider for read-only C# files: Show all Symbol Definitions Within a Document

@dibarbet
Copy link
Member

This is caused by #5787

Going to close this issue as a duplicate of that. Once it is resolved we should be able to provide various features in decompiled / metadata as source files, including go to def, document symbols, etc.

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

No branches or pull requests

2 participants