IntelliSense
IntelliSense copied to clipboard
Tooltip pops up for an UDF name inside a string value
If UDF name happens to appear inside a string which is used as value of an argument of another function (UDF or native), the IntelliSense tooltip pop up for this UDF.
E.g.: the following formula
=ISTEXT("The function AddThem is used for something")
... will show the tooltip for AddThem UDF.
Possibly we need to check double quotes while parsing the formula and searching for UDF name.
There's a bit of an attempt to do this in the FormulaParser: https://github.com/Excel-DNA/IntelliSense/blob/master/Source/ExcelDna.IntelliSense/UIMonitor/FormulaParser.cs
But I think we might need to implement a proper parser some day, instead of a few regular expressions and the current approach.
Yeah, the problem is in this file, I think. The method TryGetFormulaInfo removes all the strings w/RegEx before doing its thing, it even takes into account if we are in the middle of editing a string (it closes the quotes and then removes the string), but the method GetLineBeforeFunctionName doesn't do that, thus it finds function names inside a string. I think it needs to do similar thing.
Has this been fixed? I don't seem to have the issue on my side.
It looks like the problem appears if we are editing UDF and there's UDF name inside argument: e.g. try to type:
=AddThem("The AddThem