public void expire() { NotificationsManager.getNotificationsManager().expire(this); hideBalloon(); myExpired = true; Runnable whenExpired = myWhenExpired; if (whenExpired != null) whenExpired.run(); }
private void showErrorNotification(boolean hasErrors) { NotificationsManager manager = NotificationsManager.getNotificationsManager(); ErrorsFoundNotification[] notifications = manager.getNotificationsOfType(ErrorsFoundNotification.class, myProject); if (hasErrors) { // do not show notification if it is already shown if (notifications.length == 0) { new ErrorsFoundNotification(myProject).notify(myProject.isDefault() ? null : myProject); } } else { // expire notification for (ErrorsFoundNotification notification : notifications) { notification.expire(); } } }
public void expire() { NotificationsManager.getNotificationsManager().expire(this); if (myBalloonRef != null) { final Balloon balloon = myBalloonRef.get(); if (balloon != null) { balloon.hide(); } myBalloonRef = null; } myExpired = true; }