in kotlin,how to get a common context when use the KtPsiFactory api
Answered
Please sign in to leave a comment.
Please be more specific. What exact code are you calling and what is the question?
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.
Can you do something like in
org.jetbrains.kotlin.idea.refactoring.changeSignature.ui.KotlinCallableParameterTableModel.Companion#getTypeCodeFragmentContext