private static string GetTooltipText(SymbolDefinition symbol, ParseTree.Leaf leaf) { if (symbol.kind == SymbolKind.Method) { var method = symbol as MethodDefinition; if (method != null && method.IsExtensionMethod) { var nodeLeft = leaf.parent; if (nodeLeft != null && nodeLeft.RuleName == "accessIdentifier") { nodeLeft = nodeLeft.FindPreviousNode() as ParseTree.Node; if (nodeLeft != null && (nodeLeft.RuleName == "primaryExpressionPart" || nodeLeft.RuleName == "primaryExpressionStart")) { var symbolLeft = FGResolver.GetResolvedSymbol(nodeLeft); if (symbolLeft != null && symbolLeft.kind != SymbolKind.Error && !(symbolLeft is TypeDefinitionBase)) { return(symbol.GetTooltipTextAsExtensionMethod()); } } } } } return(symbol.GetTooltipText()); }
private static string GetTooltipText(SymbolDefinition symbol, ParseTree.Leaf leaf) { if (symbol.kind == SymbolKind.Method) { var method = symbol as MethodDefinition; if (method != null && method.IsExtensionMethod) { var nodeLeft = leaf.parent; if (nodeLeft != null && nodeLeft.RuleName == "accessIdentifier") { nodeLeft = nodeLeft.FindPreviousNode() as ParseTree.Node; if (nodeLeft != null && (nodeLeft.RuleName == "primaryExpressionPart" || nodeLeft.RuleName == "primaryExpressionStart")) { var symbolLeft = FGResolver.GetResolvedSymbol(nodeLeft); if (symbolLeft != null && symbolLeft.kind != SymbolKind.Error && !(symbolLeft is TypeDefinitionBase)) return symbol.GetTooltipTextAsExtensionMethod(); } } } } return symbol.GetTooltipText(); }