From da3ea2390e3b544e6d8592c20a0019045a8b4578 Mon Sep 17 00:00:00 2001 From: Vassiliy Kudryashov Date: Fri, 9 Dec 2022 12:34:13 +0300 Subject: [PATCH] Summaries disabled in config file is not applied #1321 (#1500) As for key enableSummariesGeneration, settings.properties provides default value for plugin settings --- .../org/utbot/intellij/plugin/models/GenerateTestsModel.kt | 3 ++- .../main/kotlin/org/utbot/intellij/plugin/settings/Settings.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/models/GenerateTestsModel.kt b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/models/GenerateTestsModel.kt index 150e893cb8..66097c7a90 100644 --- a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/models/GenerateTestsModel.kt +++ b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/models/GenerateTestsModel.kt @@ -16,6 +16,7 @@ import com.intellij.psi.PsiClass import com.intellij.psi.PsiJavaFile import com.intellij.refactoring.util.classMembers.MemberInfo import org.jetbrains.kotlin.psi.KtFile +import org.utbot.framework.UtSettings import org.utbot.framework.plugin.api.JavaDocCommentStyle import org.utbot.framework.util.ConflictTriggers import org.utbot.intellij.plugin.settings.Settings @@ -54,7 +55,7 @@ class GenerateTestsModel( val conflictTriggers: ConflictTriggers = ConflictTriggers() var runGeneratedTestsWithCoverage : Boolean = false - var enableSummariesGeneration : Boolean = true + var enableSummariesGeneration : Boolean = UtSettings.enableSummariesGeneration } val PsiClass.packageName: String diff --git a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/settings/Settings.kt b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/settings/Settings.kt index 53e0c79b37..8c905738ee 100644 --- a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/settings/Settings.kt +++ b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/settings/Settings.kt @@ -62,7 +62,7 @@ class Settings(val project: Project) : PersistentStateComponent var fuzzingValue: Double = 0.05, var runGeneratedTestsWithCoverage: Boolean = false, var commentStyle: JavaDocCommentStyle = JavaDocCommentStyle.defaultItem, - var enableSummariesGeneration: Boolean = true + var enableSummariesGeneration: Boolean = UtSettings.enableSummariesGeneration ) { constructor(model: GenerateTestsModel) : this( codegenLanguage = model.codegenLanguage,