mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Github: use NotificationListener.URL_OPENING_LISTENER
This commit is contained in:
@@ -180,14 +180,7 @@ public class GithubCreateGistAction extends DumbAwareAction {
|
||||
private static void showNotificationWithLink(@NotNull Project project, @NotNull final String url) {
|
||||
Notificator.getInstance(project)
|
||||
.notify(GitVcs.IMPORTANT_ERROR_NOTIFICATION, "Gist Created Successfully", "Your gist url: <a href='open'>" + url + "</a>",
|
||||
NotificationType.INFORMATION, new NotificationListener() {
|
||||
@Override
|
||||
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
|
||||
if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
|
||||
BrowserUtil.launchBrowser(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
NotificationType.INFORMATION, NotificationListener.URL_OPENING_LISTENER);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -449,14 +449,7 @@ public class GithubShareAction extends DumbAwareAction {
|
||||
@NotNull String title,
|
||||
@NotNull final String url) {
|
||||
Notification notification = new Notification(GithubUtil.GITHUB_NOTIFICATION_GROUP, message, "<a href='" + url + "'>" + title + "</a>",
|
||||
NotificationType.INFORMATION, new NotificationListener() {
|
||||
@Override
|
||||
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
|
||||
if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
|
||||
BrowserUtil.launchBrowser(url);
|
||||
}
|
||||
}
|
||||
});
|
||||
NotificationType.INFORMATION, NotificationListener.URL_OPENING_LISTENER);
|
||||
Notificator.getInstance(project).notify(notification);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user