"Action is not performed because target component is not showing"

已回答

I'm showing a notification with an action. The action is supposed to open a URL. I get the warning:

 

2022-03-29 10:02:33,898 [  33512]   WARN - api.actionSystem.ex.ActionUtil - Action is not performed because target component is not showing: action=de.sist.gitlab.pipelinemonitor.notifier.NotifierService$1, component=com.intellij.ui.components.labels.LinkLabel 

I don't really understand why because the notification is clearly there and so is the label. The component which supposedly isn't being shown is the label of the action I just pressed.

The complete code:

 Notification notification = notificationGroup.createNotification("GitLab branch status", content, notificationType);

        notification.addAction(new NotificationAction("Open in Browser") {
            @Override
            public void actionPerformed(@NotNull AnActionEvent e, @NotNull Notification notification) {
                UrlOpener.openUrl(status.pipelineLink);
                notification.expire();
                LightsControl.turnOffAllLights();
            }
        });

I don't see how this could be my fault?

0

Could you please try with latest IDE version(s)? if it still occurs, please specify exact IDE build

0

Happens starting my plugin using `221.5080.56-EAP-SNAPSHOT`.

Can't test it with today's build: https://youtrack.jetbrains.com/issue/IDEA-291192

0

请先登录再写评论。