import org.jetbrains.annotations.Nullable;
import javax.swing.*;
+import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
@Override
public void reportMessage(@NotNull final String message, @NotNull final MessageType type, @Nullable final HyperlinkListener listener) {
- NotificationListener notificationListener = listener == null ? null : (notification, event) -> listener.hyperlinkUpdate(event);
+ NotificationListener notificationListener = listener == null ? null : (notification, event) -> {
+ if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
+ listener.hyperlinkUpdate(event);
+ }
+ };
NOTIFICATION_GROUP.createNotification("", message, type.toNotificationType(), notificationListener).notify(myProject);
}