From 8d5e953d8e15dfd011d4fa46cb3dc6fefb14ba28 Mon Sep 17 00:00:00 2001 From: Mikhail Mazurkevich Date: Sat, 23 Nov 2019 01:01:39 +0300 Subject: [PATCH] [jps-cache] Fix showing notification in wrong frame GitOrigin-RevId: f18bc014bf8dc6582fb686d9527a8f318533eeb3 --- .../intellij/jps/cache/loader/JpsOutputLoaderManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/jps-cache/src/com/intellij/jps/cache/loader/JpsOutputLoaderManager.java b/plugins/jps-cache/src/com/intellij/jps/cache/loader/JpsOutputLoaderManager.java index e422b01e75e8..e396a007dda8 100644 --- a/plugins/jps-cache/src/com/intellij/jps/cache/loader/JpsOutputLoaderManager.java +++ b/plugins/jps-cache/src/com/intellij/jps/cache/loader/JpsOutputLoaderManager.java @@ -99,7 +99,7 @@ public class JpsOutputLoaderManager { notification.expire(); load(false); })); - Notifications.Bus.notify(notification); + Notifications.Bus.notify(notification, myProject); }); }); } @@ -225,7 +225,7 @@ public class JpsOutputLoaderManager { String message = "Update compiler caches completed successfully in " + endTime + " s"; Notification notification = NONE_NOTIFICATION_GROUP.createNotification("Compiler Caches Loader", message, NotificationType.INFORMATION, null); - Notifications.Bus.notify(notification); + Notifications.Bus.notify(notification, myProject); }); LOG.info("Loading finished"); } @@ -262,11 +262,11 @@ public class JpsOutputLoaderManager { return (Runtime.getRuntime().availableProcessors() / 2) > 3 ? 3 : 1; } - private static void onFail() { + private void onFail() { ApplicationManager.getApplication().invokeLater(() -> { Notification notification = NONE_NOTIFICATION_GROUP.createNotification("Compiler Caches Loader", "Update compiler caches failed", NotificationType.WARNING, null); - Notifications.Bus.notify(notification); + Notifications.Bus.notify(notification, myProject); }); } } \ No newline at end of file