Closed kvdubina closed 2 years ago
Thanks for reporting this bug. In XSLT, modes are defined quite differently than other symbols, this possibly accounts for the problem.
With other symbols there can be only one definition, with XSLT I suppose we can say that there's a mode definition on each xsl:template
instruction where a mode name is specified. The xsl:mode
instruction should also be considered a 'definition' if it has a name
attribute.
The xsl:apply-templates
instruction with a named mode can therefore be considered a symbol reference.
The Rename Symbol
feature is related to this. There's a bug when renaming a mode - the mode name change is repeated at the cursor position
'Goto Definition' does not quite fit with XSLT modes (as there is no single definition), but this is implemented as follows:
xsl:mode
instruction - do nothing as this can be considered the definitionxsl:template
instruction:
xsl:mode
instruction if it exists, or: xsl:apply-templates
instruction with same mode in same modulexsl:apply-templates
instruction:
xsl:mode
instruction if it exists, or: xsl:template
instruction with same mode in same moduleDid not work reliably as:
mode
attribute of an xsl:template
instruction
in Futures: Goto Definition — For all symbol references like variables, parameters, functions, modes, accumulators etc.
Ехаmple:
Goto on mode1 in does not go to
But it works for variables
Video https://user-images.githubusercontent.com/16345533/189931333-aa1f8459-ebe8-43e4-9585-ee12d9ff034b.mov