-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Support 'view call hierarchy' on primary consstructor #77328
Support 'view call hierarchy' on primary consstructor #77328
Conversation
var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); | ||
var symbolUnderCaret = await SymbolFinder.FindSymbolAtPositionAsync( | ||
semanticModel, caretPosition, document.Project.Solution.Services, cancellationToken).ConfigureAwait(false); | ||
var symbolAndProject = await FindUsagesHelpers.GetRelevantSymbolAndProjectAtPositionAsync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switched to common helper that gets the symbol and does hte mapping.
|
||
var point = args.TextView.Caret.Position.Point.GetPoint(args.SubjectBuffer, PositionAffinity.Predecessor); | ||
if (point is null) | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pulled this up as we want to do this before kicking off the async work.
return; | ||
} | ||
|
||
var caretPosition = args.TextView.Caret.Position.BufferPosition.Position; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: this was broken. we need to map the caret pos down to the subject buffer (which i now do above). otherwise projection scenarios do not work.
@akhera99 @JoeRobich ptal. |
Fixes #77327