com.itangcent.intellij.logger.NotificationHelper.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of guice-action Show documentation
Show all versions of guice-action Show documentation
Help for developing plugins for JetBrains products.
KotlinAnAction:provide ActionContext(support inject guice) for actionPerformed
The newest version!
package com.itangcent.intellij.logger
import com.google.inject.ImplementedBy
import com.intellij.notification.Notification
import com.intellij.notification.NotificationGroup
import com.itangcent.intellij.context.ActionContext
@ImplementedBy(DefaultNotificationHelper::class)
interface NotificationHelper {
fun notify(notify: (NotificationGroup) -> Notification)
companion object {
fun instance(): NotificationHelper {
return ActionContext.getContext()?.instance(NotificationHelper::class)
?: DefaultNotificationHelper()
}
}
}