I have a custom XML format that links to Java resources. For the sake of simplicity let\'s assume my XML file would look like this:
First of all, here's a nice tutorial that came up a few days ago, which explains the basics of IntelliJ plugin development (you should take a look at the section Reference Contributor).
You will likely have to define your own PsiReferenceContributor
, which will be referenced in your plugin.xml
like this:
<psi.referenceContributor implementation="com.yourplugin.YourReferenceContributor"/>
In your reference contributor, there's a method registerReferenceProviders(PsiReferenceRegistrar)
where you will be able to call registry.registerReferenceProvider(XmlTag.class, provider)
.
Finally, in your instance of PsiReferenceProvider
, you will have to test the tag name to filter out tags which don't contain class references, then find the right Java class using JavaPsiFacade.findClass()
.
From my experience, the best place to get help regarding IntelliJ plugin development is JetBrains' forums.