|
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.team.core.mapping.provider.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.
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.
ResourceMapping,
SubscriberScopeManager| Constructor Summary | |
|---|---|
SynchronizationScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[] inputMappings,
org.eclipse.core.resources.mapping.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 org.eclipse.core.resources.mapping.ResourceTraversal[] |
addMappingToScope(org.eclipse.core.resources.mapping.ResourceMapping mapping,
org.eclipse.core.resources.mapping.ResourceTraversal[] traversals)
Add the mapping and its calculated traversals to the scope. |
protected org.eclipse.core.resources.mapping.ResourceTraversal[] |
adjustInputTraversals(org.eclipse.core.resources.mapping.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(org.eclipse.core.resources.mapping.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. |
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. |
static org.eclipse.core.resources.mapping.ResourceMapping[] |
getMappingsFromProviders(org.eclipse.core.resources.mapping.ResourceTraversal[] traversals,
org.eclipse.core.resources.mapping.ResourceMappingContext context,
IProgressMonitor monitor)
Convenience method for obtaining the set of resource mappings from all model providers that overlap with the given resources. |
IProject[] |
getProjects()
Return the projects that apply to 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(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. |
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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SynchronizationScopeManager(org.eclipse.core.resources.mapping.ResourceMapping[] inputMappings,
org.eclipse.core.resources.mapping.ResourceMappingContext resourceMappingContext,
boolean consultModels)
consultModels is true then
the moel providers will be queried in order to determine if
additional mappings should be included in the scope
inputMappings - the input mappingsresourceMappingContext - a resource mapping contextconsultModels - whether modle providers should be consulted| Method Detail |
public static org.eclipse.core.resources.mapping.ResourceMapping[] getMappingsFromProviders(org.eclipse.core.resources.mapping.ResourceTraversal[] traversals,
org.eclipse.core.resources.mapping.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()
RemoteResourceMappingContext, the rule is a multi-rule that
covers the projects of the context.
public void initialize(IProgressMonitor monitor)
throws CoreException
ISynchronizationScopeManagerThis method obtaines 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 org.eclipse.core.resources.mapping.ResourceTraversal[] refresh(org.eclipse.core.resources.mapping.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(org.eclipse.core.resources.mapping.ResourceMapping[] inputMappings)
inputMappings - the input mappings
protected org.eclipse.core.resources.mapping.ResourceTraversal[] adjustInputTraversals(org.eclipse.core.resources.mapping.ResourceTraversal[] traversals)
Subclasses may override this method to include additional resources
traversals - the input resource traversals
protected final org.eclipse.core.resources.mapping.ResourceTraversal[] addMappingToScope(org.eclipse.core.resources.mapping.ResourceMapping mapping,
org.eclipse.core.resources.mapping.ResourceTraversal[] traversals)
mapping - the resource mappingtraversals - the resource mapping's traversals
public org.eclipse.core.resources.mapping.ResourceMappingContext getContext()
ISynchronizationScopeManager
getContext in interface ISynchronizationScopeManagerResourceMapping.getTraversals(ResourceMappingContext, org.eclipse.core.runtime.IProgressMonitor)public ISynchronizationScope getScope()
ISynchronizationScopeManager
getScope in interface ISynchronizationScopeManagerpublic IProject[] getProjects()
ISynchronizationScopeManagerRemoteResourceMappingContext.getProjects()
getProjects in interface ISynchronizationScopeManagerpublic void dispose()
ISynchronizationScopeManager
dispose in interface ISynchronizationScopeManagerpublic void refresh(org.eclipse.core.resources.mapping.ResourceMapping[] mappings)
ISynchronizationScopeManagerISynchronizationScopeParticipant
instances when they detect changes that require the scope
to be adjusted.
refresh in interface ISynchronizationScopeManagermappings - the mappings to be refeshed.
|
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, 2005. All rights reserved.