Search in sources :

Example 6 with NotificationGroup

use of com.intellij.notification.NotificationGroup in project google-cloud-intellij by GoogleCloudPlatform.

the class AppEngineStandardUnsupportedJavaVersionCheck method warnUser.

private void warnUser(Project project, List<Module> invalidModules) {
    String message = new StringBuilder().append("<p>").append(GctBundle.message("appengine.support.java.version.alert.detail", "<a href=\"" + UPDATE_HREF + "\">", "</a>")).append("</p>").toString();
    NotificationGroup notification = new NotificationGroup(GctBundle.message("appengine.support.java.version.alert.title"), NotificationDisplayType.BALLOON, true);
    notification.createNotification(GctBundle.message("appengine.support.java.version.alert.title"), message, NotificationType.WARNING, new LanguageLevelLinkListener(invalidModules)).notify(project);
}
Also used : NotificationGroup(com.intellij.notification.NotificationGroup)

Example 7 with NotificationGroup

use of com.intellij.notification.NotificationGroup in project google-cloud-intellij by GoogleCloudPlatform.

the class ConflictingAppEnginePluginCheck method showNotification.

private void showNotification(@NotNull IdeaPluginDescriptor plugin) {
    NotificationGroup notification = new NotificationGroup(GctBundle.message("plugin.conflict.error.title"), NotificationDisplayType.BALLOON, true);
    String errorMessage = new StringBuilder().append("<p>").append(GctBundle.message("plugin.conflict.error.detail", plugin.getName())).append("</p>").append("<br />").append("<p>").append(GctBundle.message("plugin.conflict.error.action", "<a href=\"" + DEACTIVATE_LINK_HREF + "\">", "</a>")).append("</p>").toString();
    notification.createNotification(GctBundle.message("plugin.conflict.error.title"), errorMessage, NotificationType.ERROR, new IdeaAppEnginePluginLinkListener(plugin)).notify(null);
    UsageTrackerProvider.getInstance().trackEvent(GctTracking.APP_ENGINE_OLD_PLUGIN_NOTIFICATION).ping();
}
Also used : NotificationGroup(com.intellij.notification.NotificationGroup)

Example 8 with NotificationGroup

use of com.intellij.notification.NotificationGroup 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;
}
Also used : NotificationGroup(com.intellij.notification.NotificationGroup) Notification(com.intellij.notification.Notification)

Example 9 with NotificationGroup

use of com.intellij.notification.NotificationGroup in project intellij-community by JetBrains.

the class NotificationParentGroup method findParent.

@Nullable
public static NotificationParentGroupBean findParent(@NotNull NotificationSettings setting) {
    prepareInfo();
    String groupId = setting.getGroupId();
    NotificationGroup group = NotificationGroup.findRegisteredGroup(groupId);
    NotificationParentGroupBean parent;
    if (group == null) {
        parent = myGroupToParent.get(groupId);
    } else {
        String parentId = group.getParentId();
        if (parentId == null) {
            parent = myGroupToParent.get(group.getDisplayId());
            if (parent != null) {
                group.setParentId(parent.id);
            }
        } else {
            parent = myParents.get(parentId);
        }
    }
    return parent;
}
Also used : NotificationGroup(com.intellij.notification.NotificationGroup) Nullable(org.jetbrains.annotations.Nullable)

Example 10 with NotificationGroup

use of com.intellij.notification.NotificationGroup in project intellij-community by JetBrains.

the class NotificationsConfigurationImpl method getAllSettings.

public synchronized NotificationSettings[] getAllSettings() {
    Collection<NotificationSettings> settings = new THashSet<>(myIdToSettingsMap.values());
    for (NotificationGroup group : NotificationGroup.getAllRegisteredGroups()) {
        settings.add(getSettings(group.getDisplayId()));
    }
    NotificationSettings[] result = settings.toArray(new NotificationSettings[settings.size()]);
    Arrays.sort(result, NOTIFICATION_SETTINGS_COMPARATOR);
    return result;
}
Also used : NotificationGroup(com.intellij.notification.NotificationGroup) THashSet(gnu.trove.THashSet)

Aggregations

NotificationGroup (com.intellij.notification.NotificationGroup)13 Notification (com.intellij.notification.Notification)4 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 NotificationListener (com.intellij.notification.NotificationListener)1 NotificationType (com.intellij.notification.NotificationType)1 Application (com.intellij.openapi.application.Application)1 ExternalProjectsView (com.intellij.openapi.externalSystem.view.ExternalProjectsView)1 ExternalProjectsViewImpl (com.intellij.openapi.externalSystem.view.ExternalProjectsViewImpl)1 UpdatedFiles (com.intellij.openapi.vcs.update.UpdatedFiles)1 THashSet (gnu.trove.THashSet)1 HyperlinkEvent (javax.swing.event.HyperlinkEvent)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1