void (@NotNull BuildTextConsoleView consoleView, @NotNull String group, @NotNull BuildIssue buildIssue) { Project project = consoleView.getProject(); Map<String, NotificationListener> listenerMap = new LinkedHashMap<>(); for (BuildIssueQuickFix quickFix : buildIssue.getQuickFixes()) { listenerMap.put(quickFix.getId(), (notification, event) -> { BuildView buildView = findBuildView(consoleView); Component component = buildView == null ? consoleView : buildView; DataContext dataContext = DataManager.getInstance().getDataContext(component); quickFix.runQuickFix(project, dataContext); }); } NotificationListener listener = new NotificationListener.Adapter() { @Override protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent event) { if (event.getEventType() != HyperlinkEvent.EventType.ACTIVATED) return; final NotificationListener notificationListener = listenerMap.get(event.getDescription()); if (notificationListener != null) { notificationListener.hyperlinkUpdate(notification, event); } } }; Notification notification = new Notification(group, buildIssue.getTitle(), buildIssue.getDescription(), NotificationType.WARNING) .setListener(listener); print(consoleView, notification, buildIssue.getDescription()); }