Plugin Notification Ballon not visible.

Hi,

 

i'am writing a Plugin for PhpStorm that should display Notification Ballons. But my Problem is the Notifications are only in the Log.

here are the relevant code:

 

public class Poll implements StartupActivity {

private NotificationGroup pollNotifications;

@Override
public void runActivity(@NotNull Project project) {
        pollNotifications = new NotificationGroup("Push Notifications", NotificationDisplayType.STICKY_BALLOON, true);

// NotificationListener is a Thread
NotificationListener client = new NotificationListener(remote, userEmail, new ReceiveHandler() {

@Override
public void receive(NotificationListener listener, String data) {
...
displayNotification(title, content, t);
}

}
client.start();

}
    synchronized private void displayNotification(String title, String message, NotificationType type) {
Notifications.Bus.notify(pollNotifications.createNotification(title, message, type, null));
}

}

irrelevant try catch IOException is removed.
0
3 comments

Hey,

On the first glance, everything's fine. Is there something interesting in log files? Also, did you try to invoke a simple code like the following? Does it work?

NotificationGroup group = new NotificationGroup("Push Notifications", NotificationDisplayType.STICKY_BALLOON, true);
group.createNotification("Title", "Message", NotificationType.INFORMATION, null).notify(null);
0

Same issue here. Any idea how to fix it?

0

Dfzuluaga please create a new thread and describe your problem and provide sample code

0

Please sign in to leave a comment.