I’ve created TypeScript to Java Symbol reference which matches service calls by class and method names. It works perfectly TS → Java way, but then in Java file I see “No usages”
I’ve implemented: NavigatableSymbol, PsiSymbolReference and PsiSymbolReferenceProvider
Our symbols implementation might be found here:
What should I do more to see usages of Java class methods?
Find usage machinery checks only those references that are provided by implementations of so-called reference searchers.
The idea is that if you are looking for references of a class Foo, you basically need to search for all text occurrences of Foo in all source files and check if each occurrence has a reference to Foo class. But Java reference searchers do not look into non-Java files, and it’s the responsibility of the plugin to provide a searcher that consumes all potential occurrences in other languages.
See com.intellij.psi.impl.search.JavaRecordComponentSearcher as an example.
After clicking around I got only what’s on screenshot. Selecting method results in PsiParameter being found only, and only if method has any parameters. Selecting non params method does nothing…