I am developing a codegen IDEA Plugin. I have stuck in getting the full name of KtNameReferenceExpression represent reference for a long time.
data class TestBean(
val tag: String = ""
The part where font is bold is stored as KtNameReferenceExpression in Psi Tree.
Unfortunately, KtNameReferenceExpression seemingly only contains simple name info (in this case is "KEY_TAG" and "IConfig"), which is not I am seeking for ("com.example.config.KEY_TAG" and "com.example.config.IConfig")
I have try to traverse the KtFile and find any information about "KEY_TAG" or "IConfig", like trying to find all top-level KtDeclaration and trying to find all import list. But it so complex, and I think there is to do this.
Could you please help me to find out a better and correct way to obtain KtNameReferenceExpression full name? Thank you! :)