Event when notification is closed (using "x" button)
已回答
I'm periodically running a check which may create a balloon popup notification. I don't want for the thread to create a new notification if the old one is still visible so I store its visibility in a variable (setting it to true when calling the notify() method). Unfortunately the whenExpired()-Runnable is only called when the notification is expired by me. How can I find out if the notification was just closed (so I can set the visibility variable to false)?
请先登录再写评论。
com.intellij.notification.NotificationsManager#getNotificationsOfType should work to check for existing, non-expired notifications.
You can also add a listener to the notification balloon: