> On Jan 18, 2025, at 10:31 AM, Andrew Truckle <
truc...@gmail.com> wrote:
>
> Hi Matt
>
> I have not investigated that. Bu I now realise that even that is not sufficient. For example:
>
> <xsl:variable name="happy" ^
>
> If I have typed the above and the cursor is now where the ^ is. At the point I need to detect:
> 1. That the command is xsl:variable
> 2. That the name parameter has already been applied.
> 3. Display the Select value in the drop-list.
>
> My original idea will not work anyway. It would only work if I am on the first parameter. So this is where I am getting confused. Whilst I can display a function list, or a parameter list, I need to know the context. I am not sure how to programatically work that out. Originally I though that I could possibly use reg ex to find the function for the current text. eg: search backword for xsl: and extract the text afterwards, in this case "variable". This would give me the function for showing the parameter list. But I don't know how.
If you know your tags will only span one line, you could use SCI_GETCURLINE and manually parse the returned string up to the returned position, splitting on spaces for example. Otherwise you’re getting into very complex territory that probably involves iterating backwards, looking for a ‘<‘ not in a string and then parsing the result.