use of com.intellij.notification.NotificationListener.UrlOpeningListener in project google-cloud-intellij by GoogleCloudPlatform.
the class GcpCheckoutProvider method doClone.
private static boolean doClone(@NotNull Project project, @NotNull ProgressIndicator indicator, @NotNull Git git, @NotNull String directoryName, @NotNull String parentDirectory, @NotNull String sourceRepositoryUrl) {
indicator.setIndeterminate(false);
GitLineHandlerListener progressListener = GitStandardProgressAnalyzer.createListener(indicator);
GitCommandResult result = git.clone(project, new File(parentDirectory), sourceRepositoryUrl, directoryName, progressListener);
if (result.success()) {
return true;
}
VcsNotifier.getInstance(project).notifyError(GctBundle.message("clonefromgcp.failed"), result.getErrorOutputAsHtmlString() + "<br>" + result.getOutputAsJoinedString().replaceAll(URL_REGEX, "<a href=\"$0\">$0</a>"), new UrlOpeningListener(true));
return false;
}
Aggregations