List of usage examples for org.eclipse.jgit.api SubmoduleAddCommand setProgressMonitor
public SubmoduleAddCommand setProgressMonitor(ProgressMonitor monitor)
From source file:org.eclipse.egit.core.op.SubmoduleAddOperation.java
License:Open Source License
public void execute(IProgressMonitor monitor) throws CoreException { IWorkspaceRunnable action = new IWorkspaceRunnable() { public void run(IProgressMonitor pm) throws CoreException { final SubmoduleAddCommand add = Git.wrap(repo).submoduleAdd(); add.setProgressMonitor(new EclipseGitProgressTransformer(pm)); add.setPath(path);/*from w w w.j a va2s .c o m*/ add.setURI(uri); try { if (add.call() != null) repo.notifyIndexChanged(); } catch (GitAPIException e) { throw new TeamException(e.getLocalizedMessage(), e.getCause()); } } }; ResourcesPlugin.getWorkspace().run(action, monitor != null ? monitor : new NullProgressMonitor()); }