use of com.intellij.tasks.config.TaskRepositoriesConfigurable in project intellij-community by JetBrains.
the class TaskManagerImpl method notifyAboutConnectionFailure.
private void notifyAboutConnectionFailure(final TaskRepository repository, String details) {
Notifications.Bus.register(TASKS_NOTIFICATION_GROUP, NotificationDisplayType.BALLOON);
String content = "<p><a href=\"\">Configure server...</a></p>";
if (!StringUtil.isEmpty(details)) {
content = "<p>" + details + "</p>" + content;
}
Notifications.Bus.notify(new Notification(TASKS_NOTIFICATION_GROUP, "Cannot connect to " + repository.getUrl(), content, NotificationType.WARNING, new NotificationListener() {
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
TaskRepositoriesConfigurable configurable = new TaskRepositoriesConfigurable(myProject);
ShowSettingsUtil.getInstance().editConfigurable(myProject, configurable);
if (!ArrayUtil.contains(repository, getAllRepositories())) {
notification.expire();
}
}
}), myProject);
}
Aggregations