I have read up on most of all that I could find for creating a PsiReference
for a given XmlTagValue that refers to a Java method (think XML configuration
files for a given Java class), and can't seem to find a solution.
Since the XmlTagValue does not inherit from XmlElement, I called XmlTagValue.getTextElements()
to get a an array containing XmlText's (which does inherit from XmlElement,
and thus have a getReference()). The first (and lesser important) issue
that I see here is that I don't understand the reasoning for not including
an XmlTagValue as a sub-interface of XmlElement.
The big issue is that I don't know what I need to do next to create a reference
of my XmlText (null from the start for a reason). I looked at the ReferenceProvidersRegistry
class, and it has a similar desireable function called registerXmlAttributeValueReferenceProvider();
however, this only works for XmlAttribute's, and not an XmlTagValue / XmlText.
I have read elsewhere on the newsgroup that I can create a subclass of PsiReference,
and within the resolve() function it returns the desired Java method (PsiMethod).
There are already some subclasses that are available, but being that they
are not documented I have no idea which I could possibly use (or even if
I'm supposed to use them).
Then once the reference is created, which function should I be calling within
the ReferenceProvidersRegistry? Again, hardly any documentation for this
so it's hard for me to take an educated guess without taking a divide and
conquer approach to the situation (which hasn't worked thus far).
Additionally, are there any plans to improve the current documentation for
some of the non-"Open API" functionality (e.g., stuff seen in idea.jar) that
I seem to have to rely upon frequently with my in-house XML plugin?