From f0a21654f887d0f918a75e51233b043927f50005 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Fri, 10 Nov 2023 00:32:28 +0900 Subject: [PATCH] [PSI] Allow to create contextual 'KtPsiFactory' with eventSystemEnabled The change allows creating trackable in-memory files, which are useful for intention preview. --- compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt index 5c7f0206c55..5baea2635ae 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtPsiFactory.kt @@ -66,8 +66,8 @@ class KtPsiFactory private constructor( companion object { @JvmStatic @JvmOverloads - fun contextual(context: PsiElement, markGenerated: Boolean = true): KtPsiFactory { - return KtPsiFactory(context.project, markGenerated, context, eventSystemEnabled = false) + fun contextual(context: PsiElement, markGenerated: Boolean = true, eventSystemEnabled: Boolean = false): KtPsiFactory { + return KtPsiFactory(context.project, markGenerated, context, eventSystemEnabled) } }