void (@NotNull Project project) { if (balloon != null) { return; } NotificationDisplayType displayType = NotificationsConfiguration.getNotificationsConfiguration().getDisplayType(GROUP_ID); if (displayType == NotificationDisplayType.NONE) { return; } BalloonLayout layout = frame.getBalloonLayout(); if (layout == null) { Logger.getInstance(IdeMessagePanel.class).error("frame=" + frame + " (" + frame.getClass() + ')'); return; } Notification notification = new Notification(GROUP_ID, DiagnosticBundle.message("error.new.notification.title"), NotificationType.ERROR) .setIcon(AllIcons.Ide.FatalError) .addAction(NotificationAction.createSimpleExpiring(DiagnosticBundle.message("error.new.notification.link"), () -> openErrorsDialog(null))); BalloonLayoutData layoutData = BalloonLayoutData.createEmpty(); layoutData.fadeoutTime = displayType == NotificationDisplayType.STICKY_BALLOON ? 300000 : 10000; layoutData.textColor = JBUI.CurrentTheme.Notification.Error.FOREGROUND; layoutData.fillColor = JBUI.CurrentTheme.Notification.Error.BACKGROUND; layoutData.borderColor = JBUI.CurrentTheme.Notification.Error.BORDER_COLOR; layoutData.closeAll = () -> layout.closeAll(); layoutData.showSettingButton = true; balloon = NotificationsManagerImpl.createBalloon(frame, notification, false, false, new Ref<>(layoutData), project); Disposer.register(balloon, () -> balloon = null); layout.add(balloon); }