Source:
public boolean performFinish() { final SearchRepository[] repositories = repositorySearchWizardPage .getRepositories(); String name = MessageFormat.format( Messages.RepositoryImportWizard_CloningRepositories, Integer.valueOf(repositories.length)); Job job = new Job(name) { @Override protected IStatus run(IProgressMonitor monitor) { monitor.beginTask( Messages.RepositoryImportWizard_CloningRepository, repositories.length * 3); GitHubClient client = GitHub .configureClient(new GitHubClient()); RepositoryUtil repositoryUtil = Activator.getDefault() .getRepositoryUtil(); RepositoryService service = new RepositoryService(client); for (SearchRepository repo : repositories) try { final String id = repo.getId(); monitor.setTaskName(MessageFormat .format(Messages.RepositoryImportWizard_CreatingOperation, id)); CloneOperation op = createCloneOperation(repo, service); monitor.worked(1); monitor.setTaskName(MessageFormat.format( Messages.RepositoryImportWizard_Cloning, id)); SubProgressMonitor sub = new SubProgressMonitor( monitor, 1); op.run(sub); sub.done(); monitor.setTaskName(MessageFormat .format(Messages.RepositoryImportWizard_Registering, id)); repositoryUtil.addConfiguredRepository(op.getGitDir()); monitor.worked(1); } catch (InvocationTargetException e) { GitHubUi.logError(e); } catch (InterruptedException e) { GitHubUi.logError(e); } catch (IOException e) { GitHubUi.logError(GitHubException.wrap(e)); } catch (URISyntaxException e) { GitHubUi.logError(e); } monitor.done(); return Status.OK_STATUS; } }; IWorkbenchSiteProgressService progress = PlatformUI .getWorkbench().getService(IWorkbenchSiteProgressService.class); if (progress != null) progress.schedule(job); else job.schedule(); return true; }

Target:
public boolean performFinish() { final SearchRepository[] repositories = repositorySearchWizardPage .getRepositories(); String name = MessageFormat.format( Messages.RepositoryImportWizard_CloningRepositories, Integer.valueOf(repositories.length)); Job job = new Job(name) { @Override protected IStatus run(IProgressMonitor monitor) { monitor.beginTask(name, repositories.length * 3); GitHubClient client = GitHub .configureClient(new GitHubClient()); RepositoryUtil repositoryUtil = Activator.getDefault() .getRepositoryUtil(); RepositoryService service = new RepositoryService(client); for (SearchRepository repo : repositories) try { final String id = repo.getId(); monitor.setTaskName(MessageFormat .format(Messages.RepositoryImportWizard_CreatingOperation, id)); CloneOperation op = createCloneOperation(repo, service); monitor.worked(1); monitor.setTaskName(MessageFormat.format( Messages.RepositoryImportWizard_Cloning, id)); SubProgressMonitor sub = new SubProgressMonitor( monitor, 1); op.run(sub); sub.done(); monitor.setTaskName(MessageFormat .format(Messages.RepositoryImportWizard_Registering, id)); repositoryUtil.addConfiguredRepository(op.getGitDir()); monitor.worked(1); } catch (InvocationTargetException e) { GitHubUi.logError(e); } catch (InterruptedException e) { GitHubUi.logError(e); } catch (IOException e) { GitHubUi.logError(GitHubException.wrap(e)); } catch (URISyntaxException e) { GitHubUi.logError(e); } monitor.done(); return Status.OK_STATUS; } }; IWorkbenchSiteProgressService progress = PlatformUI .getWorkbench().getService(IWorkbenchSiteProgressService.class); if (progress != null) progress.schedule(job); else job.schedule(); return true; }