diff --git a/build.gradle.kts b/build.gradle.kts index b9b7996733..823b6c22ba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -110,6 +110,10 @@ allprojects { "--add-opens", "java.base/jdk.internal.vm.annotation=ALL-UNNAMED" ) + withType { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + } + useJUnitPlatform { excludeTags = setOf("slow", "IntegrationTest") } diff --git a/utbot-intellij/src/main/resources/META-INF/plugin.xml b/utbot-intellij/src/main/resources/META-INF/plugin.xml index 5cc33db475..024c39dc04 100644 --- a/utbot-intellij/src/main/resources/META-INF/plugin.xml +++ b/utbot-intellij/src/main/resources/META-INF/plugin.xml @@ -30,7 +30,6 @@ id="org.utbot.intellij.plugin.settings.Configurable" displayName="UnitTestBot"/> - diff --git a/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/settings/CommonSettings.kt b/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/settings/CommonSettings.kt index bca83c97c3..e6ed028959 100644 --- a/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/settings/CommonSettings.kt +++ b/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/settings/CommonSettings.kt @@ -3,6 +3,7 @@ package org.utbot.intellij.plugin.settings import com.intellij.openapi.components.PersistentStateComponent +import com.intellij.openapi.components.Service import com.intellij.openapi.components.State import com.intellij.openapi.components.Storage import com.intellij.openapi.project.Project @@ -44,6 +45,7 @@ import org.utbot.framework.plugin.api.isSummarizationCompatible name = "UtBotSettings", storages = [Storage("utbot-settings.xml")] ) +@Service(Service.Level.PROJECT) class Settings(val project: Project) : PersistentStateComponent { data class State( var sourceRootHistory: MutableList = mutableListOf(), diff --git a/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt b/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt index 97cc93c24c..be3623d853 100644 --- a/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt +++ b/utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt @@ -11,7 +11,7 @@ import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.keymap.KeymapUtil import com.intellij.openapi.module.Module import com.intellij.openapi.project.Project -import com.intellij.openapi.startup.StartupActivity +import com.intellij.openapi.startup.ProjectActivity import com.intellij.openapi.wm.WindowManager import com.intellij.ui.GotItTooltip import javax.swing.event.HyperlinkEvent @@ -187,9 +187,9 @@ object TestReportUrlOpeningListener: NotificationListener.Adapter() { callbacks[descriptionSuffix]?.map { it() } ?: error("No such command with #utbot prefix: $descriptionSuffix") } -object GotItTooltipActivity : StartupActivity { +object GotItTooltipActivity : ProjectActivity { private const val KEY = "UTBot.GotItMessageWasShown" - override fun runActivity(project: Project) { + override suspend fun execute(project: Project) { ApplicationManager.getApplication().invokeLater { val shortcut = ActionManager.getInstance() .getKeyboardShortcut("org.utbot.intellij.plugin.ui.actions.GenerateTestsAction")?:return@invokeLater