What scope should I return from
getUseScope for a function parameter in my custom language plugin? Should it be a whole function or just a function body? Javadoc says:
Returns the scope in which
to this element are searched but I'm not sure.
LocalSearchScope(myFunctionBodyPsiElement) as the return value and renaming and other features worked fine until I implemented inplace renaming which doesn't work and fails with a negative offset at
com.intellij.codeInsight.template.TemplateBuilderImpl.initTemplate(TemplateBuilderImpl.java:212) . Returning
LocalSearchScope(myFunctionPsiElement) works BTW.
Should useScope include the declaration too?