use of org.eclipse.egit.core.synchronize.GitLazyResourceVariantTreeSubscriber in project egit by eclipse.
the class ModelAwareGitSynchronizer method createResourceMappingContext.
/**
* @param resources
* @param repository
* @param leftRev
* @param rightRev
* @param includeLocal
* @param monitor
* @return A resource mapping context to access the versions of the content
* of the resources involved in the synchronization.
*/
protected ResourceMappingContext createResourceMappingContext(Set<IResource> resources, Repository repository, String leftRev, String rightRev, boolean includeLocal, IProgressMonitor monitor) {
try {
GitSynchronizeData gsd = new GitSynchronizeData(repository, leftRev, rightRev, includeLocal, resources);
GitSynchronizeDataSet gsds = new GitSynchronizeDataSet(gsd);
GitLazyResourceVariantTreeSubscriber subscriber = new GitLazyResourceVariantTreeSubscriber(gsds);
subscriber.init(monitor);
return new GitSubscriberResourceMappingContext(subscriber, gsds);
} catch (IOException e) {
Activator.logError(e.getMessage(), e);
}
return ResourceMappingContext.LOCAL_CONTEXT;
}
Aggregations