Can someone explain me how PsiReferenceRegister.registerReferenceProvider() works? Can I use this to provide references for PyCallExpression?
I am working on a plugin for custom language which is based on Python plugin. Syntax of the custom language is similar to python, so we are using python plugin for parsing the file etc.
# custom language sentences can be mapped to python function calls (ie. PyCallExpression)
custom_method_one( param_name_1 = param_value_1,
param_name_2 = "param_value_2",
param_name_3 = ["param_list_elem_1", "param_list_elem_2"]
I would like to provide references to custom_method_one through a custom ReferenceProvider and register that reference provider using PsiReferenceRegister.registerReferenceProvider().
I observed that (on Intellij-9), getReferencesByElement() of the reference provider is getting invoked for PyStringLiteralExpression (like: "param_value_2" of the above sample code) but not for PyCallExpression (like: custom_method_one).
Where as, the same code used to work on Intellij-7.
Can somebody explain me what might have changed between Intellij-7 and Intellij-9 as far as referenceProviders are concerned?