Class SubscriberScopeManager
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.team.core.mapping.provider.SynchronizationScopeManager
org.eclipse.team.core.subscribers.SubscriberScopeManager
- All Implemented Interfaces:
EventListener,IAdaptable,ISynchronizationScopeManager,ISubscriberChangeListener
public class SubscriberScopeManager
extends SynchronizationScopeManager
implements ISubscriberChangeListener
A
ISynchronizationScopeManager that uses a Subscriber to provide
a RemoteResourceMappingContext and to notify participants when the
remote state of resources change.- Since:
- 3.2
-
Constructor Summary
ConstructorsConstructorDescriptionSubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, boolean consultModels) Create a manager for the given subscriber and input.SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, RemoteResourceMappingContext context, boolean consultModels) Create a manager for the given subscriber and input. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Method to be invoked when the scope of this manager is no longer needed.protected SubscriberReturn the subscriber for this manager.voidinitialize(IProgressMonitor monitor) Build the scope that is used to determine the complete set of resource mappings, and hence resources, that an operation should be performed on.refresh(ResourceMapping[] mappings, IProgressMonitor monitor) Refresh the scope of this manager for the given mappings.voidNotifies this listener that some resources' subscriber properties have changed.Methods inherited from class org.eclipse.team.core.mapping.provider.SynchronizationScopeManager
addMappingToScope, adjustInputTraversals, createScope, getContext, getMappingsFromProviders, getName, getSchedulingRule, getScope, isInitialized, refresh, setHasAdditionalMappings, setHasAdditionalResourcesMethods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
-
Constructor Details
-
SubscriberScopeManager
public SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, boolean consultModels) Create a manager for the given subscriber and input.- Parameters:
name- a human readable name for the scopeinputMappings- the input mappingssubscriber- the subscriberconsultModels- whether models should be consulted when calculating the scope
-
SubscriberScopeManager
public SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, RemoteResourceMappingContext context, boolean consultModels) Create a manager for the given subscriber and input.- Parameters:
name- a human readable name for the scopeinputMappings- the input mappingssubscriber- the subscribercontext- a remote resource mapping context for the subscriberconsultModels- whether models should be consulted when calculating the scope
-
-
Method Details
-
getSubscriber
Return the subscriber for this manager.- Returns:
- the subscriber for this manager
-
dispose
public void dispose()Description copied from interface:ISynchronizationScopeManagerMethod to be invoked when the scope of this manager is no longer needed. It is typically the responsibility of the client that creates a scope manager to dispose it.- Specified by:
disposein interfaceISynchronizationScopeManager- Overrides:
disposein classSynchronizationScopeManager
-
initialize
Description copied from interface:ISynchronizationScopeManagerBuild the scope that is used to determine the complete set of resource mappings, and hence resources, that an operation should be performed on.This method obtains a lock on the workspace root to avoid workspace changes while calculating the scope.
- Specified by:
initializein interfaceISynchronizationScopeManager- Overrides:
initializein classSynchronizationScopeManager- Parameters:
monitor- a progress monitor when building the scope- Throws:
CoreException- if an error occurs
-
refresh
public ResourceTraversal[] refresh(ResourceMapping[] mappings, IProgressMonitor monitor) throws CoreException Description copied from interface:ISynchronizationScopeManagerRefresh the scope of this manager for the given mappings. Changes in the scope will be reported as a property change event fired from the scope. Clients should call this method when a change in the workspace or a change issued from this manager have resulted in a change in the resources that should be included in the scope.- Specified by:
refreshin interfaceISynchronizationScopeManager- Overrides:
refreshin classSynchronizationScopeManager- Parameters:
mappings- the mappings to be refreshedmonitor- a progress monitor- Returns:
- a set of traversals that cover the given mappings
- Throws:
CoreException- if an error occurs
-
subscriberResourceChanged
Description copied from interface:ISubscriberChangeListenerNotifies this listener that some resources' subscriber properties have changed. The changes have already happened. For example, a resource's base revision may have changed. The resource tree may or may not be open for modification when this method is invoked.- Specified by:
subscriberResourceChangedin interfaceISubscriberChangeListener- Parameters:
deltas- detailing the kinds of changes
-