rhdunn / xquery-intellij-plugin

XQuery, XPath and XSLT Language Support for the IntelliJ IDE
https://rhdunn.github.io/xquery-intellij-plugin/
Apache License 2.0
25 stars 9 forks source link

Find usages not working at all or not working properly #46

Closed ligasgr closed 5 years ago

ligasgr commented 7 years ago

https://github.com/rhdunn/xquery-intellij-plugin/issues/30 mentions support for finding usages. For a simple scenario like:

let $x := ''
return $x

navigation to declaration place works fine but finding usage on $x in first line doesn't do anything. Same for:

declare variable $x := '';
$x

For scenario with function like below:

declare default function namespace 'http://www.w3.org/2005/xquery-local-functions';
declare function x() {'a'};
x()

Find usages on function declaration gives results for completely unrelated usages of global and local variables with name $x.

rhdunn commented 5 years ago

This was caused by various issues in the references and resolution logic, and possibly other factors. The cases listed above are now working correctly.