diff --git a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt index ce93076abb..09f976888d 100644 --- a/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt +++ b/utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/Notifications.kt @@ -1,11 +1,22 @@ package org.utbot.intellij.plugin.ui +import com.intellij.ide.util.PropertiesComponent import com.intellij.notification.NotificationDisplayType import com.intellij.notification.NotificationGroup import com.intellij.notification.NotificationListener import com.intellij.notification.NotificationType +import com.intellij.openapi.actionSystem.ActionManager +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.ui.popup.Balloon +import com.intellij.openapi.wm.WindowManager +import com.intellij.ui.GotItMessage +import com.intellij.ui.awt.RelativePoint +import com.intellij.util.ui.JBFont +import java.awt.Point abstract class Notifier { protected abstract val notificationType: NotificationType @@ -97,3 +108,22 @@ object TestsReportNotifier : InformationUrlNotifier() { override fun content(project: Project?, module: Module?, info: String): String = info } + +object GotItTooltipActivity : StartupActivity { + private const val KEY = "UTBot.GotItMessageWasShown" + override fun runActivity(project: Project) { + if (PropertiesComponent.getInstance().isTrueValue(KEY)) return + ApplicationManager.getApplication().invokeLater { + val shortcut = ActionManager.getInstance() + .getKeyboardShortcut("org.utbot.intellij.plugin.ui.actions.GenerateTestsAction")?:return@invokeLater + val shortcutText = KeymapUtil.getShortcutText(shortcut) + val message = GotItMessage.createMessage("UTBot is ready!", + "