Implementation problem about "Find Usages" feature when developing a custom language support plugin

I'm developing a custom language support plugin of Intellij Platform, with many bugs and problems resolved and not yet resolved.
 
Now, I'm confused with the implementation of "Find Usages".
 
I declared a PsiNamedElement, and a PsiElement (with getRefenrence method implemented), and a FindUsagesProvider.
I thought everything I should write is ok, but after testing, I found I'm wrong.
I found sometimes I can go to usages (with Find Usages popup), 
sometimes I can't (with simply "no usages found ..."),
and the usages shown in Find Usages popup may be incomplete.
 
Why does it and what cound me do to resolve it?
 
The plugin name is: Stellaris Modding Support.
The FindUsagesProvider class is here: StellarisLocalizationFindUsagesProvider.
1 comment
Comment actions Permalink

Please provide a more detailed explanation

- what element exactly works and sometimes doesn't

- provide corresponding test case/test data with clear instructions

Please see also 2nd NOTE paragraph on https://jetbrains.org/intellij/sdk/docs/reference_guide/custom_language_support/references_and_resolve.html

0

Please sign in to leave a comment.