void (@NotNull Notification notification) { if (ApplicationManager.getApplication().isUnitTestMode() || ApplicationManager.getApplication().isHeadlessEnvironment()) { return; } NotificationsManager notificationsManager = NotificationsManager.getNotificationsManager(); if (notificationsManager.getNotificationsOfType(notification.getClass(), myProject).length == 0) { // show only once notification.notify(myProject.isDefault() ? null : myProject); } }