From 1801d4a72cf8d352427a90879db273df507ed39c Mon Sep 17 00:00:00 2001 From: Roberto Leinardi Date: Fri, 4 Oct 2024 15:35:01 +0200 Subject: [PATCH] Update notification usage to current API --- .../pycharm/pylint/util/Notifications.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/leinardi/pycharm/pylint/util/Notifications.java b/src/main/java/com/leinardi/pycharm/pylint/util/Notifications.java index c8ba397..3c9f365 100644 --- a/src/main/java/com/leinardi/pycharm/pylint/util/Notifications.java +++ b/src/main/java/com/leinardi/pycharm/pylint/util/Notifications.java @@ -38,7 +38,6 @@ import java.io.PrintWriter; import java.io.StringWriter; -import static com.intellij.notification.NotificationListener.URL_OPENING_LISTENER; import static com.intellij.notification.NotificationType.ERROR; import static com.intellij.notification.NotificationType.INFORMATION; import static com.intellij.notification.NotificationType.WARNING; @@ -59,35 +58,30 @@ private Notifications() { public static void showInfo(final Project project, final String infoText) { BALLOON_GROUP .createNotification(TITLE, infoText, INFORMATION) - .setListener(URL_OPENING_LISTENER) .notify(project); } public static void showWarning(final Project project, final String warningText) { BALLOON_GROUP .createNotification(TITLE, warningText, WARNING) - .setListener(URL_OPENING_LISTENER) .notify(project); } public static void showWarning(final Project project, final String title, final String warningText) { BALLOON_GROUP .createNotification(title, warningText, WARNING) - .setListener(URL_OPENING_LISTENER) .notify(project); } public static void showError(final Project project, final String errorText) { BALLOON_GROUP .createNotification(TITLE, errorText, ERROR) - .setListener(URL_OPENING_LISTENER) .notify(project); } public static void showException(final Project project, final Throwable t) { LOG_ONLY_GROUP .createNotification(message("plugin.exception"), messageFor(t), ERROR) - .setListener(URL_OPENING_LISTENER) .notify(project); } @@ -97,8 +91,7 @@ public static void showInstallPylint(final Project project) { TITLE, PylintBundle.message("plugin.notification.install-pylint.content"), ERROR) - .setSubtitle(PylintBundle.message("plugin.notification.install-pylint.subtitle")) - .setListener(URL_OPENING_LISTENER); + .setSubtitle(PylintBundle.message("plugin.notification.install-pylint.subtitle")); notification .addAction(new InstallPylintAction(project, notification)) .notify(project); @@ -110,8 +103,7 @@ public static void showUnableToRunPylint(final Project project) { TITLE, PylintBundle.message("plugin.notification.unable-to-run-pylint.content"), ERROR) - .setSubtitle(PylintBundle.message("plugin.notification.unable-to-run-pylint.subtitle")) - .setListener(URL_OPENING_LISTENER); + .setSubtitle(PylintBundle.message("plugin.notification.unable-to-run-pylint.subtitle")); notification .addAction(new OpenPluginSettingsAction(notification)) .notify(project); @@ -120,7 +112,6 @@ public static void showUnableToRunPylint(final Project project) { public static void showPylintAbnormalExit(final Project project, final String detail) { BALLOON_GROUP .createNotification(TITLE, detail, ERROR) - .setListener(URL_OPENING_LISTENER) .setSubtitle(PylintBundle.message("plugin.notification.abnormal-exit.subtitle")) .notify(project); } @@ -130,8 +121,7 @@ public static void showNoPythonInterpreter(Project project) { .createNotification( TITLE, PylintBundle.message("plugin.notification.no-python-interpreter.content"), - ERROR) - .setListener(URL_OPENING_LISTENER); + ERROR); notification .addAction(new ConfigurePythonInterpreterAction(project, notification)) .notify(project);