Search in sources :

Example 1 with SynchronizeModelOperation

use of org.eclipse.team.ui.synchronize.SynchronizeModelOperation in project egit by eclipse.

the class PullAction method getSubscriberOperation.

@Override
protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) {
    return new SynchronizeModelOperation(configuration, elements) {

        @Override
        public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            GitSynchronizeDataSet gsds = (GitSynchronizeDataSet) getConfiguration().getProperty(SYNCHRONIZATION_DATA);
            Set<Repository> repositories = new HashSet<>();
            for (GitSynchronizeData gsd : gsds) repositories.add(gsd.getRepository());
            PullOperationUI pull = new PullOperationUI(repositories);
            pull.execute(monitor);
        }
    };
}
Also used : SynchronizeModelOperation(org.eclipse.team.ui.synchronize.SynchronizeModelOperation) GitSynchronizeData(org.eclipse.egit.core.synchronize.dto.GitSynchronizeData) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) Repository(org.eclipse.jgit.lib.Repository) GitSynchronizeDataSet(org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet) PullOperationUI(org.eclipse.egit.ui.internal.pull.PullOperationUI) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 GitSynchronizeData (org.eclipse.egit.core.synchronize.dto.GitSynchronizeData)1 GitSynchronizeDataSet (org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet)1 PullOperationUI (org.eclipse.egit.ui.internal.pull.PullOperationUI)1 Repository (org.eclipse.jgit.lib.Repository)1 SynchronizeModelOperation (org.eclipse.team.ui.synchronize.SynchronizeModelOperation)1