Resolve Java Class in Xml attribute

Answered

Hello,

With given example:
What should be done to make "Navigate" action work (ctrl+mouse click on `com.package.MyClass` should open corresponding java file)?

What should be done to make "Quick doc" action work (ctrl+q on `com.package.MyClass` should show MyClass top level documentation)?

0
3 comments

You need to provide PsiReference resolving to PsiClass for this XML attribute. See JavaClassReferenceProvider

0
Avatar
Permanently deleted user

Thanks for the answer, I've tried that variant

It seems that I'm missing something.
The class is present and valid but IDEA can not resolve it.
The class is in a separate module, may it be a cause? Should I specify the module for PsiClass somehow?

My code:



Regards

0

You can override the default resolve scope (module + dependent modules + libraries) via com.intellij.psi.impl.source.resolve.reference.impl.providers.JavaClassReferenceProvider#getScope

0

Please sign in to leave a comment.