Search in sources :

Example 1 with Notification

use of com.intellij.notification.Notification in project intellij-leiningen-plugin by derkork.

the class LeiningenUtil method notify.

public static void notify(final String title, final String content, final Project project) {
    Notification notification = new Notification(NOTIFICATION_GROUP_ID, title, content, NotificationType.INFORMATION);
    Notifications.Bus.notify(notification, project);
}
Also used : Notification(com.intellij.notification.Notification)

Example 2 with Notification

use of com.intellij.notification.Notification in project intellij-leiningen-plugin by derkork.

the class LeiningenUtil method notifyError.

public static void notifyError(final String title, final String content, final Project project) {
    Notification notification = new Notification(NOTIFICATION_GROUP_ID, title, content, NotificationType.ERROR);
    Notifications.Bus.notify(notification, project);
}
Also used : Notification(com.intellij.notification.Notification)

Example 3 with Notification

use of com.intellij.notification.Notification in project scss-lint-plugin by idok.

the class ScssLintProjectComponent method showNotification.

public static void showNotification(String content, NotificationType type) {
    Notification errorNotification = new Notification(PLUGIN_NAME, PLUGIN_NAME, content, type);
    Notifications.Bus.notify(errorNotification);
}
Also used : Notification(com.intellij.notification.Notification)

Example 4 with Notification

use of com.intellij.notification.Notification in project scss-lint-plugin by idok.

the class ScssLintProjectComponent method validationFailed.

private void validationFailed(String msg) {
    NotificationListener notificationListener = new NotificationListener() {

        @Override
        public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
            ScssLintInspection.showSettings(project);
        }
    };
    String errorMessage = msg + FIX_CONFIG_HREF;
    showInfoNotification(errorMessage, NotificationType.WARNING, notificationListener);
    LOG.debug(msg);
    settingValidStatus = false;
}
Also used : HyperlinkEvent(javax.swing.event.HyperlinkEvent) NotNull(org.jetbrains.annotations.NotNull) Notification(com.intellij.notification.Notification) NotificationListener(com.intellij.notification.NotificationListener)

Example 5 with Notification

use of com.intellij.notification.Notification in project jscs-plugin by idok.

the class JscsProjectComponent method showInfoNotification.

public void showInfoNotification(String content, NotificationType type, NotificationListener notificationListener) {
    Notification errorNotification = new Notification(PLUGIN_NAME, PLUGIN_NAME, content, type, notificationListener);
    Notifications.Bus.notify(errorNotification, this.project);
}
Also used : Notification(com.intellij.notification.Notification)

Aggregations

Notification (com.intellij.notification.Notification)108 HyperlinkEvent (javax.swing.event.HyperlinkEvent)34 NotNull (org.jetbrains.annotations.NotNull)34 NotificationListener (com.intellij.notification.NotificationListener)33 Project (com.intellij.openapi.project.Project)19 IOException (java.io.IOException)10 VirtualFile (com.intellij.openapi.vfs.VirtualFile)9 File (java.io.File)8 ProgressIndicator (com.intellij.openapi.progress.ProgressIndicator)7 Nullable (org.jetbrains.annotations.Nullable)7 Module (com.intellij.openapi.module.Module)6 Task (com.intellij.openapi.progress.Task)6 ExecutionException (com.intellij.execution.ExecutionException)4 NotificationType (com.intellij.notification.NotificationType)4 Application (com.intellij.openapi.application.Application)3 Library (com.intellij.openapi.roots.libraries.Library)3 ActionCallback (com.intellij.openapi.util.ActionCallback)3 ArrayList (java.util.ArrayList)3 OSProcessHandler (com.intellij.execution.process.OSProcessHandler)2 NotificationAction (com.intellij.notification.NotificationAction)2