All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.itangcent.intellij.logger.NotificationHelper.kt Maven / Gradle / Ivy

Go to download

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()
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy