in kotlin,how to get a common context when use the KtPsiFactory api

Answered
0
3 comments

Please be more specific. What exact code are you calling and what is the question?

0

I need to enter a kotlin type reference fragment in an EditorTextField. When I use KtPsiFactory.createTypeCodeFragment, this api requires a context parameter. I tried to pass null, but it didn't work properly. Due to business reasons, the context cannot be passed from the outside world in all scenarios. input, so I hope to find a common context object.

0

Can you do something like in org.jetbrains.kotlin.idea.refactoring.changeSignature.ui.KotlinCallableParameterTableModel.Companion#getTypeCodeFragmentContext

0

Please sign in to leave a comment.