Madrapps / handlebars-support

IntelliJ IDEA plugin to support Go to Declaration and Auto completion for Handlebars (.hbs)

Home Page:https://plugins.jetbrains.com/plugin/11251-handlebars-support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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]