plugin installation: show sticky balloon

This commit is contained in:
anna
2013-10-07 11:12:32 +02:00
parent 3fa84974df
commit 370a9e75a4
@@ -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 += "<br><a href=";
message += restartCapable ? "\"restart\">Restart now" : "\"shutdown\">Shutdown";
message += "</a>";
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 {