Source:
public boolean performFinish() { try { Repository repository = repositorySearchWizardPage.getRepository(); String repoName = repository.toString(); URIish uri = new URIish("git://github.com/" + repoName + Constants.DOT_GIT); boolean allSelected = true; Collection<Ref> selectedBranches = Collections.emptyList(); IPreferenceStore preferenceStore = org.eclipse.egit.ui.Activator .getDefault().getPreferenceStore(); int timeout = preferenceStore .getInt(UIPreferences.REMOTE_CONNECTION_TIMEOUT); String defaultRepoDir = preferenceStore .getString(UIPreferences.DEFAULT_REPO_DIR); final CloneOperation cloneOperation = new CloneOperation(uri, allSelected, selectedBranches, new File(defaultRepoDir + File.separator + repoName), Constants.R_HEADS + Constants.MASTER, Constants.DEFAULT_REMOTE_NAME, timeout); Job job = new Job(Messages.RepositoryImportWizard_CloningRepository) { protected IStatus run(IProgressMonitor monitor) { try { monitor.beginTask( Messages.RepositoryImportWizard_CloningRepository, 100); cloneOperation.run(monitor); monitor.worked(90); RepositoryUtil repositoryUtil = Activator.getDefault() .getRepositoryUtil(); monitor.worked(99); repositoryUtil.addConfiguredRepository(cloneOperation .getGitDir()); monitor.done(); } catch (InvocationTargetException invocationTargetException) { GitHubUi.logError(invocationTargetException); } catch (InterruptedException interruptedException) { GitHubUi.logError(interruptedException); } return Status.OK_STATUS; } }; job.setPriority(Job.SHORT); job.schedule(); } catch (URISyntaxException uriSyntaxException) { GitHubUi.logError(uriSyntaxException); return false; } return true; }

Target:
public boolean performFinish() { try { Repository repository = repositorySearchWizardPage.getRepository(); String repoName = repository.toString(); URIish uri = new URIish("git://github.com/" + repoName + Constants.DOT_GIT); boolean allSelected = true; Collection<Ref> selectedBranches = Collections.emptyList(); IPreferenceStore preferenceStore = org.eclipse.egit.ui.Activator .getDefault().getPreferenceStore(); int timeout = preferenceStore .getInt(UIPreferences.REMOTE_CONNECTION_TIMEOUT); String defaultRepoDir = preferenceStore .getString(UIPreferences.DEFAULT_REPO_DIR); final CloneOperation cloneOperation = new CloneOperation(uri, allSelected, selectedBranches, new File(defaultRepoDir + File.separator + repoName), Constants.R_HEADS + Constants.MASTER, Constants.DEFAULT_REMOTE_NAME, timeout); Job job = new Job(Messages.RepositoryImportWizard_CloningRepository) { protected IStatus run(IProgressMonitor monitor) { try { monitor.beginTask( Messages.RepositoryImportWizard_CloningRepository, 100); cloneOperation.run(monitor); monitor.worked(90); RepositoryUtil repositoryUtil = Activator.getDefault() .getRepositoryUtil(); monitor.worked(99); repositoryUtil.addConfiguredRepository(cloneOperation .getGitDir()); monitor.done(); } catch (InvocationTargetException invocationTargetException) { GitHubUi.logError(invocationTargetException); } catch (InterruptedException interruptedException) { GitHubUi.logError(interruptedException); } return Status.OK_STATUS; } }; job.setPriority(Job.SHORT); IWorkbenchSiteProgressService workbenchSiteProgressService = (IWorkbenchSiteProgressService) PlatformUI .getWorkbench().getActiveWorkbenchWindow().getActivePage() .getActivePart().getSite() .getService(IWorkbenchSiteProgressService.class); workbenchSiteProgressService.schedule(job); } catch (URISyntaxException uriSyntaxException) { GitHubUi.logError(uriSyntaxException); return false; } return true; }