use of com.intellij.notification.Notification in project intellij-community by JetBrains.
the class CreateDesktopEntryAction method reportFailure.
public static void reportFailure(@NotNull Exception e, @Nullable final Project project) {
LOG.warn(e);
final String message = ExceptionUtil.getNonEmptyMessage(e, "Internal error");
Notifications.Bus.notify(new Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, "Desktop Entry Creation Failed", message, NotificationType.ERROR), project);
}
use of com.intellij.notification.Notification in project intellij-community by JetBrains.
the class CreateLauncherScriptAction method reportFailure.
public static void reportFailure(@NotNull Exception e, @Nullable final Project project) {
LOG.warn(e);
final String message = ExceptionUtil.getNonEmptyMessage(e, "Internal error");
Notifications.Bus.notify(new Notification(Notifications.SYSTEM_MESSAGES_GROUP_ID, "Launcher Script Creation Failed", message, NotificationType.ERROR), project);
}
use of com.intellij.notification.Notification in project intellij-community by JetBrains.
the class CloudNotifier method showMessage.
public Notification showMessage(String message, MessageType messageType, @Nullable NotificationListener listener) {
NotificationGroup notificationGroup = findOrCreateBaloonGroup(myNotificationDisplayId);
Notification notification = notificationGroup.createNotification("", message, messageType.toNotificationType(), listener);
notification.notify(null);
return notification;
}
use of com.intellij.notification.Notification in project intellij-community by JetBrains.
the class IdeNotificationArea method updateStatus.
private void updateStatus() {
final Project project = getProject();
ArrayList<Notification> notifications = EventLog.getLogModel(project).getNotifications();
applyIconToStatusAndToolWindow(project, createIconWithNotificationCount(notifications));
int count = notifications.size();
setToolTipText(count > 0 ? String.format("%s notification%s pending", count, count == 1 ? "" : "s") : "No new notifications");
myStatusBar.updateWidget(ID());
}
use of com.intellij.notification.Notification in project intellij-community by JetBrains.
the class PluginManagerMain method notifyPluginsUpdated.
public static void notifyPluginsUpdated(@Nullable Project project) {
final ApplicationEx app = ApplicationManagerEx.getApplicationEx();
String title = IdeBundle.message("update.notifications.title");
String action = IdeBundle.message(app.isRestartCapable() ? "ide.restart.action" : "ide.shutdown.action");
String message = IdeBundle.message("ide.restart.required.notification", action, ApplicationNamesInfo.getInstance().getFullProductName());
NotificationListener listener = new NotificationListener() {
@Override
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
notification.expire();
app.restart(true);
}
};
UpdateChecker.NOTIFICATIONS.createNotification(title, XmlStringUtil.wrapInHtml(message), NotificationType.INFORMATION, listener).notify(project);
}
Aggregations