Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #121 from sharwell/fix-119
Browse files Browse the repository at this point in the history
Improve identification of relevant nodes for QuickInfo in Roslyn
  • Loading branch information
SergeyTeplyakov committed Jul 14, 2015
2 parents bf87941 + efea728 commit f7245ce
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,18 @@ public static SyntaxNode GetTargetAtTriggerPoint(ITrackingPoint triggerPoint, IT
if (asCall != null) {

//Make sure we aren't on the right side of the call
if (asCall.Expression == leafNode)
return asCall;

MemberAccessExpressionSyntax memberAccessExpression = asCall.Expression as MemberAccessExpressionSyntax;
if (memberAccessExpression == null || memberAccessExpression.Name == leafNode)
return null;
if (memberAccessExpression != null && memberAccessExpression.Name == leafNode)
return asCall;

return asCall;
GenericNameSyntax genericNameSyntax = asCall.Expression as GenericNameSyntax;
if (genericNameSyntax != null && genericNameSyntax.Identifier == leafToken)
return asCall;

return null;
}

var asProp = nodeInQuestion as MemberAccessExpressionSyntax;
Expand Down

0 comments on commit f7245ce

Please sign in to comment.