-
Notifications
You must be signed in to change notification settings - Fork 309
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 functionality to show the type hierarchy #133
Comments
Seems like a good idea; presumably will look similar to the document symbol list. If it's just inheritance, won't this already be a flat list? Or are mixins/interfaces included too? |
It could be a flat list going up, if you omit interfaces and such. Going down it'd be more difficult - easy to show children, harder to organize the grandchildren - |
Yup; we'll need to flatten it somehow. That may be some creative naming of |
Had a quick look at this... Seems we can't use spaces to indent, not have multiple spaces together, they get stripped (including literal non-breaking spaces). Any character I use to try and force the indent looks lame: Ideally, we'd have real indenting and be able to add icons and such, so it looks similar to the document symbol list: Not sure how well we'll be able to do this. I've added an additional comment to #133 asking if they do it, could they consider use for this as well as just a view of symbols in the current document. |
I pushed the branch that has a command wired up to |
I don't think we can reasonably implement this without changes in Code. There's some discussion about this here but it looks like it's some way off (if it'll ever be added) :( |
@devoncarew Since I hadn't had much time to do anything more, I've pushed out an update with this in. |
I've opened #243 to investigate if we can improve this with a new API from Code. |
hey @DanTup , does it mean that type hierarchy is only available for newer version of the dart sdk ? |
@dupuchba I'm not sure I completely understand the question (or at least as it relates to this issue). This issue was about an old type hierarchy that does not work for LSP (which is what most users are using). I've recently been working on supported the new native Type Hierarchy support in VS Code as you noted in #4226. That support will only be available in new SDKs (currently it's only in dev/master versions, but it should be included in a future stable release of Dart/Flutter SDKs). |
In other tools, this is hooked up to something like
F4
. Those tools are able to show a tree view of the type hierarchy (superclasses and subclasses). We may have to expose this info in a vscode selection list (https://code.visualstudio.com/docs/extensionAPI/vscode-api#_window), so would need to flatten it somehow.The text was updated successfully, but these errors were encountered: