How to show notification for a few seconds even if the user closes it?

Answered

Currently if I show a notification, even if the user clicks anywhere in the Editor, the notification is closed automatically. This means that the user might accidentally click on something when the notification is shown and doesn't have enough time to read it. I'd like either to let the user close it manually by clicking on it, or to dissapear after 3 seconds. 

 

Notification notification = NotificationGroup.toolWindowGroup("demo.notifications.toolWindow", ToolWindowId.DEBUG)
.createNotification(
"Empty", "", "Nothing happened...",
NotificationType.ERROR);
notification.setImportant(true);
notification.notify(project);
1 comment
Comment actions Permalink

I assume that you're referring to the Balloon that appears next to the ToolWindow button, right? Unfortunately, there is no possibility of forcing it visible.

However, if you will not attach the Balloon directly to the TW, it will appear in the bottom-right corner as a stand-alone balloon.

0

Please sign in to leave a comment.