Eclipse Platform
Release 3.2

org.eclipse.team.core.mapping
Interface ISynchronizationScopeManager

All Known Implementing Classes:
SynchronizationScopeManager

public interface ISynchronizationScopeManager

A scope manager is responsible for ensuring that the resources contained within an ISynchronizationScope stay up-to-date with the model elements (represented as ResourceMapping instances) contained in the scope. The task of keeping a scope up-to-date is accomplished by obtaining ISynchronizationScopeParticipant instances for each model that has elements contained in the scope.

This interface is not intended to be implemented by clients. Clients can instead subclass SynchronizationScopeManager.

EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/Team team.

Since:
3.2
See Also:
ResourceMapping, SynchronizationScopeManager, ISynchronizationScopeParticipant

Method Summary
 void dispose()
          Method to be invoked when the scope of this manager is no longer needed.
 org.eclipse.core.resources.mapping.ResourceMappingContext getContext()
          Return the resource mapping contxt that the scope uses to obtain traversals from resource mappings in order to determine what resources are in the scope.
 IProject[] getProjects()
          Return the projects that apply to this manager.
 ISynchronizationScope getScope()
          Return the scope that is managed by 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.
 boolean isInitialized()
          Return whether the scope has been initialized.
 void refresh(org.eclipse.core.resources.mapping.ResourceMapping[] mappings)
          Refresh the given mapping asynchronously.
 org.eclipse.core.resources.mapping.ResourceTraversal[] refresh(org.eclipse.core.resources.mapping.ResourceMapping[] mappings, IProgressMonitor monitor)
          Refresh the scope of this manager for the given mappings.
 

Method Detail

getScope

public ISynchronizationScope getScope()
Return the scope that is managed by this manager.

Returns:
the scope that is managed by this manager

getProjects

public IProject[] getProjects()
Return the projects that apply to this manager. The projects returned will depend on the type of context used to generate this scope. If the context is a local context, all workspace projects are returned. If it is a remote context, the projects are the same as those returned from RemoteResourceMappingContext.getProjects()

Returns:
the projects that apply to this manager

getContext

public org.eclipse.core.resources.mapping.ResourceMappingContext getContext()
Return the resource mapping contxt that the scope uses to obtain traversals from resource mappings in order to determine what resources are in the scope.

Returns:
the resource mapping contxt that the scope uses to obtain traversals from resource mappings
See Also:
ResourceMapping.getTraversals(ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)

isInitialized

public boolean isInitialized()
Return whether the scope has been initialized.

Returns:
whether the scope has been initialized.

initialize

public void initialize(IProgressMonitor monitor)
                throws CoreException
Build 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 obtaines a lock on the workspace root to avoid workspace changes while calculating the scope.

Parameters:
monitor - a progress monitor when building the scope
Throws:
CoreException

refresh

public org.eclipse.core.resources.mapping.ResourceTraversal[] refresh(org.eclipse.core.resources.mapping.ResourceMapping[] mappings,
                                                                      IProgressMonitor monitor)
                                                               throws CoreException
Refresh 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.

Parameters:
mappings - the mappings to be refreshed
monitor - a progress monitor
Returns:
a set of traversals that cover the given mappings
Throws:
CoreException

dispose

public void dispose()
Method to be invoked when the scope of this manager is no longer needed. It is typically the reponsibility of the client that creates a scope manager to dispose of it.


refresh

public void refresh(org.eclipse.core.resources.mapping.ResourceMapping[] mappings)
Refresh the given mapping asynchronously. This method is called by ISynchronizationScopeParticipant instances when they detect changes that require the scope to be adjusted.

Parameters:
mappings - the mappings to be refeshed.

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.