If you think the Android project adb-idea listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.developerphil.adbidea.ui;
/*www.java2s.com*/import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
publicclass NotificationHelper {
publicstaticvoid info(String message) {
sendNotification(message, NotificationType.INFORMATION);
}
publicstaticvoid error(String message) {
sendNotification(message, NotificationType.ERROR);
}
publicstaticvoid sendNotification(String message, NotificationType notificationType) {
Notification notification = new Notification("com.developerphil.adbidea", "ADB IDEA", espaceString(message), notificationType);
Notifications.Bus.notify(notification);
}
privatestatic String espaceString(String string) {
// replace with both so that it returns are preserved in the notification ballon and in the event log
return string.replaceAll("\n", "\n<br />");
}
}