Skip to content

Commit e3f5516

Browse files
Vassiliy-KudryashovVassiliy.Kudryashovalisevych
authored
Update plugin.xml and plugin-specific services to actual IntelliJ API (#2654)
* Update change notes in plugin.xml for release 2023.10 * Make JDK names more readable (in unsupported version warning) (#2646) Use better JDK names in unsupported version warning #2635 (cherry picked from commit 4bb4329) * Correct plugin description in plugin.xml * Update plugin.xml and plugin-specific services to actual API --------- Co-authored-by: Vassiliy.Kudryashov <Vassiliy.Kudryashov@huawei.com> Co-authored-by: Alena Lisevych <alena.lisevych@gmail.com>
1 parent 9242d6e commit e3f5516

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ allprojects {
110110
"--add-opens", "java.base/jdk.internal.vm.annotation=ALL-UNNAMED"
111111
)
112112

113+
withType<Jar> {
114+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
115+
}
116+
113117
useJUnitPlatform {
114118
excludeTags = setOf("slow", "IntegrationTest")
115119
}

utbot-intellij/src/main/resources/META-INF/plugin.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
id="org.utbot.intellij.plugin.settings.Configurable"
3131
displayName="UnitTestBot"/>
3232
<!--suppress PluginXmlValidity -->
33-
<projectService serviceImplementation="org.utbot.intellij.plugin.settings.Settings" preload="true"/>
3433
<registryKey defaultValue="false" description="Enable editing Kotlin test files" key="kotlin.ultra.light.classes.empty.text.range"/>
3534
<postStartupActivity implementation="org.utbot.intellij.plugin.ui.GotItTooltipActivity"/>
3635
<projectModelModifier implementation="org.androidstudio.plugin.util.UtAndroidGradleJavaProjectModelModifierWrapper" order="first"/>

utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/settings/CommonSettings.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package org.utbot.intellij.plugin.settings
44

55
import com.intellij.openapi.components.PersistentStateComponent
6+
import com.intellij.openapi.components.Service
67
import com.intellij.openapi.components.State
78
import com.intellij.openapi.components.Storage
89
import com.intellij.openapi.project.Project
@@ -44,6 +45,7 @@ import org.utbot.framework.plugin.api.isSummarizationCompatible
4445
name = "UtBotSettings",
4546
storages = [Storage("utbot-settings.xml")]
4647
)
48+
@Service(Service.Level.PROJECT)
4749
class Settings(val project: Project) : PersistentStateComponent<Settings.State> {
4850
data class State(
4951
var sourceRootHistory: MutableList<String> = mutableListOf(),

utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.intellij.openapi.application.ApplicationManager
1111
import com.intellij.openapi.keymap.KeymapUtil
1212
import com.intellij.openapi.module.Module
1313
import com.intellij.openapi.project.Project
14-
import com.intellij.openapi.startup.StartupActivity
14+
import com.intellij.openapi.startup.ProjectActivity
1515
import com.intellij.openapi.wm.WindowManager
1616
import com.intellij.ui.GotItTooltip
1717
import javax.swing.event.HyperlinkEvent
@@ -187,9 +187,9 @@ object TestReportUrlOpeningListener: NotificationListener.Adapter() {
187187
callbacks[descriptionSuffix]?.map { it() } ?: error("No such command with #utbot prefix: $descriptionSuffix")
188188
}
189189

190-
object GotItTooltipActivity : StartupActivity {
190+
object GotItTooltipActivity : ProjectActivity {
191191
private const val KEY = "UTBot.GotItMessageWasShown"
192-
override fun runActivity(project: Project) {
192+
override suspend fun execute(project: Project) {
193193
ApplicationManager.getApplication().invokeLater {
194194
val shortcut = ActionManager.getInstance()
195195
.getKeyboardShortcut("org.utbot.intellij.plugin.ui.actions.GenerateTestsAction")?:return@invokeLater

0 commit comments

Comments
 (0)