public class SubscriberScopeManager extends SynchronizationScopeManager implements ISubscriberChangeListener
ISynchronizationScopeManager
that uses a Subscriber
to provide
a RemoteResourceMappingContext
and to notify participants when the
remote state of resources change.Constructor and Description |
---|
SubscriberScopeManager(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.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Method to be invoked when the scope of this
manager is no longer needed.
|
protected Subscriber |
getSubscriber()
Return the subscriber for this manager.
|
void |
initialize(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.
|
ResourceTraversal[] |
refresh(ResourceMapping[] mappings,
IProgressMonitor monitor)
Refresh the scope of this manager for the given mappings.
|
void |
subscriberResourceChanged(ISubscriberChangeEvent[] deltas)
Notifies this listener that some resources' subscriber properties have
changed.
|
addMappingToScope, adjustInputTraversals, createScope, getContext, getMappingsFromProviders, getName, getSchedulingRule, getScope, isInitialized, refresh, setHasAdditionalMappings, setHasAdditionalResources
getAdapter
public SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, boolean consultModels)
name
- a human readable name for the scopeinputMappings
- the input mappingssubscriber
- the subscriberconsultModels
- whether models should be consulted when calculating the scopepublic SubscriberScopeManager(String name, ResourceMapping[] inputMappings, Subscriber subscriber, RemoteResourceMappingContext context, boolean consultModels)
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 scopeprotected Subscriber getSubscriber()
public void dispose()
ISynchronizationScopeManager
dispose
in interface ISynchronizationScopeManager
dispose
in class SynchronizationScopeManager
public void initialize(IProgressMonitor monitor) throws CoreException
ISynchronizationScopeManager
This method obtains a lock on the workspace root to avoid workspace changes while calculating the scope.
initialize
in interface ISynchronizationScopeManager
initialize
in class SynchronizationScopeManager
monitor
- a progress monitor
when building the scopeCoreException
public ResourceTraversal[] refresh(ResourceMapping[] mappings, IProgressMonitor monitor) throws CoreException
ISynchronizationScopeManager
refresh
in interface ISynchronizationScopeManager
refresh
in class SynchronizationScopeManager
mappings
- the mappings to be refreshedmonitor
- a progress monitorCoreException
public void subscriberResourceChanged(ISubscriberChangeEvent[] deltas)
ISubscriberChangeListener
subscriberResourceChanged
in interface ISubscriberChangeListener
deltas
- detailing the kinds of changes
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.