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

Add file path to details of a call hierarchy result #10997

Closed
michelleangela opened this issue May 23, 2023 · 13 comments
Closed

Add file path to details of a call hierarchy result #10997

michelleangela opened this issue May 23, 2023 · 13 comments
Labels
enhancement Improvement to an existing feature Feature: Call Hierarchy Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@michelleangela
Copy link
Contributor

Worked great when I used it before 👌 Only one detail on my wishlist which is to easily view which file the call resides in without clicking.

Originally posted by @csholmq in #16 (comment)

@csholmq
Copy link
Contributor

csholmq commented May 23, 2023

When having multiple definitions it's easy to get confused which is which.
image

Perhaps something similar to how the search view works.
image

@michelleangela
Copy link
Contributor Author

michelleangela commented May 23, 2023

For what structure is shown in the results panel, this is actually managed by VS Code. For this change request, an issue will need to filed at https://github.com/Microsoft/vscode to change the UI panel.

What the extension can edit is the details properties of each function shown in the call tree. Currently the details display the containing name, such as namespace, of a function. The file path or name can be included in the details properties to provide more info about the function.
image

@csholmq
Copy link
Contributor

csholmq commented May 23, 2023

File path would be nice but would be obscured for longer function names. Perhaps the hover could be utilized here and the function definition (which the hover seem to currently display) could be what's listed in the UI?

@sean-mcmanus
Copy link
Contributor

Our extension doesn't have control over what is shown in the hover UI, but if the file path were added to the details then it would appear in the hover. We could also probably add the line and column info too.

@michelleangela
Copy link
Contributor Author

michelleangela commented May 30, 2023

Just to clarify, the details properties of a call hierarchy item is the info used for hover, that is hover does not provide additional info than what's already shown on the right side of the call hierarchy item. The tool tip is useful in allowing full visibility of text that's cut off when the window width is small. Here is an example:

image

Adding @AlexandraKemperMS for input.

@michelleangela michelleangela modified the milestones: On Deck, 1.16 May 30, 2023
@michelleangela michelleangela self-assigned this May 30, 2023
@sean-mcmanus
Copy link
Contributor

Yeah, that seems good to me, but I'm not sure what punctuation is ideal to separate the namespace/class from the file.

@michelleangela
Copy link
Contributor Author

michelleangela commented Jun 12, 2023

Suggested text format to display:

myFunction() - myNamespace - testFile.cpp (C:\myfolder\project)

This way, users can see the file name first.

@sean-mcmanus
Copy link
Contributor

@michelleangela Yeah, sounds good to me.

@AlexandraKemperMS
Copy link

@michelleangela wouldn't we want to only show the file name in this case? Or show:

testFile.cpp (C:\myfolder\project)- myNamespace

so that the filename is first and namespace is second?

@sean-mcmanus
Copy link
Contributor

@AlexandraKemperMS I think the namespace should go first, since it's more important than the file info.

@AlexandraKemperMS
Copy link

@sean-mcmanus I chatted with michelle, yes, namespace first is the way to go. Michelle's original suggestion is fine to me.

@michelleangela michelleangela modified the milestones: 1.16, 1.16.1 Jun 15, 2023
@michelleangela michelleangela added the fixed Check the Milestone for the release in which the fix is or will be available. label Jun 19, 2023
@michelleangela
Copy link
Contributor Author

@michelleangela michelleangela removed their assignment Jun 23, 2023
@michelleangela
Copy link
Contributor Author

Fix is now available in release version 1.16.2.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature Feature: Call Hierarchy Feature Request fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

4 participants