From 8ab2b5f8d369df72fb57f3ba3e0595e38762da27 Mon Sep 17 00:00:00 2001 From: tangcent Date: Tue, 19 Mar 2024 08:47:36 +0800 Subject: [PATCH] fix: resolve configuration loading issue in several actions (#1111) --- .../com/itangcent/idea/plugin/actions/FieldsToMessageAction.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/actions/FieldsToMessageAction.kt b/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/actions/FieldsToMessageAction.kt index 3cc153e62..c5ad1b2fc 100644 --- a/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/actions/FieldsToMessageAction.kt +++ b/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/actions/FieldsToMessageAction.kt @@ -7,9 +7,11 @@ import com.intellij.psi.PsiClass import com.intellij.psi.PsiType import com.itangcent.common.logger.traceError import com.itangcent.idea.plugin.api.cache.ProjectCacheRepository +import com.itangcent.idea.plugin.config.EnhancedConfigReader import com.itangcent.idea.plugin.rule.SuvRuleParser import com.itangcent.idea.utils.CustomizedPsiClassHelper import com.itangcent.idea.utils.RuleComputeListenerRegistry +import com.itangcent.intellij.config.ConfigReader import com.itangcent.intellij.config.rule.RuleComputeListener import com.itangcent.intellij.config.rule.RuleParser import com.itangcent.intellij.context.ActionContext @@ -56,6 +58,7 @@ abstract class FieldsToMessageAction : BasicAnAction { builder.bind(RuleComputeListener::class) { it.with(RuleComputeListenerRegistry::class).singleton() } builder.bind(PsiClassHelper::class) { it.with(CustomizedPsiClassHelper::class).singleton() } + builder.bind(ConfigReader::class) { it.with(EnhancedConfigReader::class).singleton() } } override fun actionPerformed(actionContext: ActionContext, project: Project?, anActionEvent: AnActionEvent) {