Search in sources :

Example 6 with SubscriberScopeManager

use of org.eclipse.team.core.subscribers.SubscriberScopeManager in project egit by eclipse.

the class GitScopeUtil method createScopeManager.

/**
 * Creates a new {@link SubscriberScopeManager} for the given set of
 * {@link IResource}s
 *
 * @param resources
 * @param monitor
 * @return {@link SubscriberScopeManager}
 */
private static SubscriberScopeManager createScopeManager(final IResource[] resources, IProgressMonitor monitor) {
    ResourceMapping[] mappings = GitScopeUtil.getResourceMappings(resources);
    GitSynchronizeDataSet set = new GitSynchronizeDataSet();
    final GitResourceVariantTreeSubscriber subscriber = new GitResourceVariantTreeSubscriber(set);
    monitor.setTaskName(UIText.GitModelSynchronize_fetchGitDataJobName);
    subscriber.init(monitor);
    SubscriberScopeManager manager = new SubscriberScopeManager(UIText.GitScopeOperation_GitScopeManager, mappings, subscriber, true);
    return manager;
}
Also used : GitSynchronizeDataSet(org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet) SubscriberScopeManager(org.eclipse.team.core.subscribers.SubscriberScopeManager) ResourceMapping(org.eclipse.core.resources.mapping.ResourceMapping) GitResourceVariantTreeSubscriber(org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber)

Aggregations

SubscriberScopeManager (org.eclipse.team.core.subscribers.SubscriberScopeManager)6 GitResourceVariantTreeSubscriber (org.eclipse.egit.core.synchronize.GitResourceVariantTreeSubscriber)4 ResourceMapping (org.eclipse.core.resources.mapping.ResourceMapping)3 GitSubscriberMergeContext (org.eclipse.egit.core.synchronize.GitSubscriberMergeContext)3 GitSynchronizeDataSet (org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet)3 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 GitSubscriberResourceMappingContext (org.eclipse.egit.core.synchronize.GitSubscriberResourceMappingContext)2 GitSynchronizeData (org.eclipse.egit.core.synchronize.dto.GitSynchronizeData)2 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)2 HashSet (java.util.HashSet)1 IResource (org.eclipse.core.resources.IResource)1 WorkspaceJob (org.eclipse.core.resources.WorkspaceJob)1 ModelProvider (org.eclipse.core.resources.mapping.ModelProvider)1 RemoteResourceMappingContext (org.eclipse.core.resources.mapping.RemoteResourceMappingContext)1 ResourceMappingContext (org.eclipse.core.resources.mapping.ResourceMappingContext)1 SubMonitor (org.eclipse.core.runtime.SubMonitor)1 IJobChangeEvent (org.eclipse.core.runtime.jobs.IJobChangeEvent)1 Job (org.eclipse.core.runtime.jobs.Job)1 JobChangeAdapter (org.eclipse.core.runtime.jobs.JobChangeAdapter)1