-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 container information to CallHierarchyItem
#37061
Comments
Given that you're in call hierarchy, won't you end up with many of the same icons anyway? What sorts of distinctions would be helpful here, and would they only apply to methods on classes? |
Yes I don't think we would use the |
@jrieken Do you think we should show the file name for every entry? This is similar to workspace symbol search results |
In a very first version we showed the file name and that was disliked - often different (contained) types are in the same file. Also file paths are very long. That's why container name is wanted, which sometimes might be a file name but often is a class or namespace name. Having this will provide much more context and will make it easier to work with the call hierarchy (which by its nature can be confusing already) |
Here's my proposal for the TS Server api: interface CallHierarchyItem {
/**
* Name of symbol's container symbol (if any), such as the class name.
*/
containerName?: string;
} Not sure we have a use for |
@mjbvz did we adopt this? I don't see a difference when selfhosting |
@andrewbranch Looks like TS does not return a value for |
It turns out there’s a data conversion function on the server layer, which our normal test suite doesn’t touch, that returns an object with a specific set of keys, so the new property was left out of the serialization. PR incoming. |
From microsoft/vscode#89616
Search Terms
Problem
Currently using the call hierarchy api, it can be difficult to browse through long list of callers and understand where those callers are:
Suggestion
Add optional information about the container on the
CallHierarchyItem
type. For example, theNavTooItem
has:We should consider something similar for
CallHierarchyItem
/cc @jrieken
The text was updated successfully, but these errors were encountered: