Replace `allFields` with appropriate method for Kotlin specific classes.
thsaravana opened this issue · comments
val animalsNotEmpty: Boolean
get() = animals.isNotEmpty()
In the above case animalsNotEmpty
is not returned in PsiClass.allFields
.
We need to do these instead:
(group?.psiClass as KtLightClass).kotlinOrigin.findPropertyByName("animalsNotEmpty")
(group?.psiClass as KtLightClass).kotlinOrigin.getBody().properties
(group?.psiClass as KtLightClass).kotlinOrigin.getPrimaryConstructorParameterList().children[0]