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

Commit

Permalink
Improve identification of relevant nodes for QuickInfo in Roslyn
Browse files Browse the repository at this point in the history
Fixes #119
  • Loading branch information
sharwell committed Jul 11, 2015
1 parent 94fa4e7 commit efea728
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 efea728

Please sign in to comment.