From 370a9e75a4990d8bc6a0830d9a2220cc21b723e2 Mon Sep 17 00:00:00 2001 From: anna Date: Mon, 7 Oct 2013 11:06:17 +0200 Subject: [PATCH] plugin installation: show sticky balloon --- .../ide/plugins/PluginManagerMain.java | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerMain.java b/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerMain.java index 7b93211c15c4..b8c36473dcf3 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerMain.java +++ b/platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerMain.java @@ -21,10 +21,7 @@ import com.intellij.ide.BrowserUtil; import com.intellij.ide.IdeBundle; import com.intellij.ide.ui.search.SearchUtil; import com.intellij.ide.ui.search.SearchableOptionsRegistrar; -import com.intellij.notification.Notification; -import com.intellij.notification.NotificationListener; -import com.intellij.notification.NotificationType; -import com.intellij.notification.Notifications; +import com.intellij.notification.*; import com.intellij.openapi.Disposable; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.application.ApplicationManager; @@ -532,24 +529,24 @@ public abstract class PluginManagerMain implements Disposable { message += "
Restart now" : "\"shutdown\">Shutdown"; message += ""; - Notifications.Bus.notify(new Notification("Plugins Lifecycle Group", - pluginName != null - ? "Plugin \'" + pluginName + "\' was successfully installed" - : "Plugins were installed", - XmlStringUtil.wrapInHtml(message), NotificationType.INFORMATION, - new NotificationListener() { - @Override - public void hyperlinkUpdate(@NotNull Notification notification, - @NotNull HyperlinkEvent event) { - notification.expire(); - if (restartCapable) { - app.restart(true); - } - else { - app.exit(true); - } - } - })); + new NotificationGroup("Plugins Lifecycle Group", NotificationDisplayType.STICKY_BALLOON, true) + .createNotification(pluginName != null + ? "Plugin \'" + pluginName + "\' was successfully installed" + : "Plugins were installed", + XmlStringUtil.wrapInHtml(message), NotificationType.INFORMATION, + new NotificationListener() { + @Override + public void hyperlinkUpdate(@NotNull Notification notification, + @NotNull HyperlinkEvent event) { + notification.expire(); + if (restartCapable) { + app.restart(true); + } + else { + app.exit(true); + } + } + }).notify(null); } protected class SortByStatusAction extends ToggleAction {