Search in sources :

Example 1 with GitRepositoryInfo

use of org.eclipse.egit.ui.internal.provisional.wizards.GitRepositoryInfo in project egit by eclipse.

the class SmartImportGitWizard method doClone.

private File doClone(final SmartImportRootWizardPage importRootPage) {
    setCallerRunsCloneOperation(true);
    try {
        final GitRepositoryInfo repositoryInfo = currentSearchResult.getGitRepositoryInfo();
        performClone(repositoryInfo);
        getContainer().getShell().getDisplay().asyncExec(new Runnable() {

            @Override
            public void run() {
                runCloneOperation(getContainer(), repositoryInfo);
                cloneDestination.saveSettingsForClonedRepo();
                importRootPage.setInitialImportRoot(getCloneDestinationPage().getDestinationFile());
            }
        });
    } catch (URISyntaxException e) {
        org.eclipse.egit.ui.Activator.error(UIText.GitImportWizard_errorParsingURI, e);
    } catch (NoRepositoryInfoException e) {
        org.eclipse.egit.ui.Activator.error(UIText.GitImportWizard_noRepositoryInfo, e);
    } catch (Exception e) {
        org.eclipse.egit.ui.Activator.error(e.getMessage(), e);
    }
    return getCloneDestinationPage().getDestinationFile();
}
Also used : GitRepositoryInfo(org.eclipse.egit.ui.internal.provisional.wizards.GitRepositoryInfo) URISyntaxException(java.net.URISyntaxException) NoRepositoryInfoException(org.eclipse.egit.ui.internal.provisional.wizards.NoRepositoryInfoException) URISyntaxException(java.net.URISyntaxException) NoRepositoryInfoException(org.eclipse.egit.ui.internal.provisional.wizards.NoRepositoryInfoException)

Example 2 with GitRepositoryInfo

use of org.eclipse.egit.ui.internal.provisional.wizards.GitRepositoryInfo in project egit by eclipse.

the class RepositorySelectionPage method getGitRepositoryInfo.

@Override
public GitRepositoryInfo getGitRepositoryInfo() {
    GitRepositoryInfo info = new GitRepositoryInfo(uri.toString());
    info.setCredentials(user, password);
    info.setShouldSaveCredentialsInSecureStore(storeInSecureStore);
    uriProposalHandler.updateProposals();
    return info;
}
Also used : GitRepositoryInfo(org.eclipse.egit.ui.internal.provisional.wizards.GitRepositoryInfo)

Aggregations

GitRepositoryInfo (org.eclipse.egit.ui.internal.provisional.wizards.GitRepositoryInfo)2 URISyntaxException (java.net.URISyntaxException)1 NoRepositoryInfoException (org.eclipse.egit.ui.internal.provisional.wizards.NoRepositoryInfoException)1