|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.team.core.mapping.provider.SynchronizationScopeManager
public class SynchronizationScopeManager
Class for translating a set of ResourceMapping objects
representing a view selection into the complete set of resources to be
operated on.
Here's a summary of the scope generation algorithm:
This implementation does not involve participants in the scope management
process. It is up to subclasses that wish to support a longer life cycle for
scopes to provide for participation. For example, the
SubscriberScopeManager class includes participates in the scope
management process.
This class is can be subclasses by clients.
ResourceMapping,
SubscriberScopeManager| Constructor Summary | |
|---|---|
SynchronizationScopeManager(String name,
ResourceMapping[] inputMappings,
ResourceMappingContext resourceMappingContext,
boolean consultModels)
Create a scope manager that uses the given context to determine what resources should be included in the scope. |
|
| Method Summary | |
|---|---|
protected ResourceTraversal[] |
addMappingToScope(ResourceMapping mapping,
ResourceTraversal[] traversals)
Add the mapping and its calculated traversals to the scope. |
protected ResourceTraversal[] |
adjustInputTraversals(ResourceTraversal[] traversals)
Adjust the given set of input resources to include any additional resources required by a particular repository provider for the current operation. |
protected ISynchronizationScope |
createScope(ResourceMapping[] inputMappings)
Create the scope that will be populated and returned by the builder. |
void |
dispose()
Method to be invoked when the scope of this manager is no longer needed. |
ResourceMappingContext |
getContext()
|
static ResourceMapping[] |
getMappingsFromProviders(ResourceTraversal[] traversals,
ResourceMappingContext context,
IProgressMonitor monitor)
Convenience method for obtaining the set of resource mappings from all model providers that overlap with the given resources. |
String |
getName()
Returns the human readable name of this manager. |
ISchedulingRule |
getSchedulingRule()
Return the scheduling rule that is used when initializing and refreshing the scope. |
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(ResourceMapping[] mappings)
Refresh the given mappings by recalculating the traversals for the mappings and adjusting the scope accordingly. |
ResourceTraversal[] |
refresh(ResourceMapping[] mappings,
IProgressMonitor monitor)
Refresh the scope of this manager for the given mappings. |
protected void |
setHasAdditionalMappings(ISynchronizationScope scope,
boolean hasAdditionalMappings)
set whether the scope has additional mappings. |
protected void |
setHasAdditionalResources(boolean hasAdditionalResources)
set whether the scope has additional resources. |
| Methods inherited from class org.eclipse.core.runtime.PlatformObject |
|---|
getAdapter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SynchronizationScopeManager(String name,
ResourceMapping[] inputMappings,
ResourceMappingContext resourceMappingContext,
boolean consultModels)
consultModels is true then
the model providers will be queried in order to determine if
additional mappings should be included in the scope
name - the name of the scopeinputMappings - the input mappingsresourceMappingContext - a resource mapping contextconsultModels - whether model providers should be consulted| Method Detail |
|---|
public static ResourceMapping[] getMappingsFromProviders(ResourceTraversal[] traversals,
ResourceMappingContext context,
IProgressMonitor monitor)
throws CoreException
traversals - the resource traversalscontext - the resource mapping contextmonitor - a progress monitor
CoreExceptionpublic boolean isInitialized()
ISynchronizationScopeManager
isInitialized in interface ISynchronizationScopeManagerpublic ISchedulingRule getSchedulingRule()
public void initialize(IProgressMonitor monitor)
throws CoreException
ISynchronizationScopeManagerThis method obtains a lock on the workspace root to avoid workspace changes while calculating the scope.
initialize in interface ISynchronizationScopeManagermonitor - a progress monitor
when building the scope
CoreException
public ResourceTraversal[] refresh(ResourceMapping[] mappings,
IProgressMonitor monitor)
throws CoreException
ISynchronizationScopeManager
refresh in interface ISynchronizationScopeManagermappings - the mappings to be refreshedmonitor - a progress monitor
CoreException
protected final void setHasAdditionalMappings(ISynchronizationScope scope,
boolean hasAdditionalMappings)
hasAdditionalMappings - a boolean indicating if the scope has
additional mappingsprotected final void setHasAdditionalResources(boolean hasAdditionalResources)
hasAdditionalResources - a boolean indicating if the scope has
additional resourcesprotected final ISynchronizationScope createScope(ResourceMapping[] inputMappings)
inputMappings - the input mappings
protected ResourceTraversal[] adjustInputTraversals(ResourceTraversal[] traversals)
Subclasses may override this method to include additional resources
traversals - the input resource traversals
protected final ResourceTraversal[] addMappingToScope(ResourceMapping mapping,
ResourceTraversal[] traversals)
mapping - the resource mappingtraversals - the resource mapping's traversals
public ResourceMappingContext getContext()
public ISynchronizationScope getScope()
ISynchronizationScopeManager
getScope in interface ISynchronizationScopeManagerpublic void dispose()
ISynchronizationScopeManager
dispose in interface ISynchronizationScopeManagerpublic void refresh(ResourceMapping[] mappings)
mappings - the mappings to be refreshedpublic String getName()
null.
|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.