I'm writing a custom language plugin for a workflow language. The files contain references to Spring services. A spring service with the name "doSomethingService" (@Service("doSomethingService") may be called in the workflow file by using "someSomething".
I was able to implement a PsiReferenceContributor that successfully injects references. I can Ctrl+Click from the workflow file to the service and from the service to the workflow call.
When I try to find usages from the service annotation I get a window with the two references but selecting either will then result in a message that no usages could be found. Finding usages from the workflow file doesn't work either.
Unfortunately I can't post the full code. I'm using a FindUsagesHandlerFactory as well as a WorkflowFindUsagesProvider. I don't understand how the references can work but the usages don't, especially as from the service it actually finds references but then can't resolve them.
The workflow files also contain references to a certain class's enums and here everything works fine. This is the only kind of reference where the PSI element's ID is the same as in the java class so I'm guessing this works because in this case the matching is simple, i.e. literal?