-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Distinguish types of calls for call hierarchy? #84100
Comments
Yeah, I would say always return all calls but having something like a |
@rbuckton Are there use cases where it would help users to be able to distinguish these different types of calls? |
I don't have any specific use cases in mind, but I've seen similar features in other tools (such as Reflector) respect this kind of classification. For accessors especially, it can be useful to distinguish between call sites using the setter and call sites using the getter. Many hierarchy items will only have a single classification (classes can only be |
I like and I believe that it will add value, e.g. the UX can show icons or allow to filter/group by kinds. In fact, there is a similar request to classify reference search results like that too, see #74237. @rbuckton Would you be OK to invent kinds that make sense for TS and we take that as base to make this vscode API - basically a common denominator that works for multiple languages |
Possibly, I'll see what I can come up with. |
So far it doesn't seem like there's a good reason to distinguish these types using icons: However, I could see a use-case for filtering the results, possibly in the upper-right-hand corner of the peek adjacent to the "Calls To"/"Calls From" icon: VS's version of Call Hierarchy does not have filtering, so I am not certain if there would be value in adding that capability. |
For the call hierarchy, @rbuckton brought up that JavaScript and TypeScript has many different ways of actually invoking a function:
new Foo()
@foo
obj.foo
My proposal is that TS should return call hierarchy items for all of these cases, but I wanted to check this with you @jrieken. Does that make sense? Should we consider having a way to distinguish different call types?
The text was updated successfully, but these errors were encountered: