use of com.android.tools.idea.gradle.project.sync.hyperlink.BuildProjectHyperlink in project android by JetBrains.
the class ObjectStreamErrorHandler method findAndAddQuickFixes.
private static void findAndAddQuickFixes(@NotNull NotificationData notification, @NotNull Project project, @NotNull String text) {
List<NotificationHyperlink> hyperlinks = new ArrayList<>();
NotificationHyperlink buildProjectHyperlink = new BuildProjectHyperlink();
NotificationHyperlink openAndroidSdkManagerHyperlink = new OpenAndroidSdkManagerHyperlink();
text += "Please try one of the following:<ul>" + "<li>" + buildProjectHyperlink.toHtml() + " to obtain the cause of the error</li>" + "<li>" + openAndroidSdkManagerHyperlink.toHtml() + " to check if there are any missing components</li></ul>";
hyperlinks.add(buildProjectHyperlink);
hyperlinks.add(openAndroidSdkManagerHyperlink);
notification.setTitle(SyncMessage.DEFAULT_GROUP);
notification.setMessage(text);
notification.setNotificationCategory(NotificationCategory.convert(DEFAULT_NOTIFICATION_TYPE));
SyncMessages.getInstance(project).addNotificationListener(notification, hyperlinks);
}
Aggregations