Search in sources :

Example 1 with UrlOpeningListener

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;
}
Also used : UrlOpeningListener(com.intellij.notification.NotificationListener.UrlOpeningListener) GitLineHandlerListener(git4idea.commands.GitLineHandlerListener) GitCommandResult(git4idea.commands.GitCommandResult) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File)

Aggregations

UrlOpeningListener (com.intellij.notification.NotificationListener.UrlOpeningListener)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 GitCommandResult (git4idea.commands.GitCommandResult)1 GitLineHandlerListener (git4idea.commands.GitLineHandlerListener)1 File (java.io.File)1