|
Eclipse Platform Release 3.6 |
|||||||||
| 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.SynchronizationContext
public abstract class SynchronizationContext
Abstract implementation of the ISynchronizationContext interface.
This class can be subclassed by clients.
ISynchronizationContext| Field Summary |
|---|
| Fields inherited from interface org.eclipse.team.core.mapping.ISynchronizationContext |
|---|
THREE_WAY, TWO_WAY |
| Constructor Summary | |
|---|---|
protected |
SynchronizationContext(ISynchronizationScopeManager manager,
int type,
IResourceDiffTree diffTree)
Create a synchronization context. |
| Method Summary | |
|---|---|
void |
dispose()
Dispose of the synchronization context and the cache of the context. |
ICache |
getCache()
Return the cache associated with this synchronization context. |
IResourceDiffTree |
getDiffTree()
Return a tree that contains IDiff entries for resources that
are out-of-sync. |
ISynchronizationScope |
getScope()
Return the input that defined the scope of this synchronization context. |
ISynchronizationScopeManager |
getScopeManager()
Return the scope manager for the scope of this context. |
int |
getType()
Return the synchronization type. |
void |
refresh(ResourceMapping[] mappings,
IProgressMonitor monitor)
Refresh the portion of the context related to the given resource mappings. |
| 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 |
| Methods inherited from interface org.eclipse.team.core.mapping.ISynchronizationContext |
|---|
refresh |
| Constructor Detail |
|---|
protected SynchronizationContext(ISynchronizationScopeManager manager,
int type,
IResourceDiffTree diffTree)
manager - the manager that defines the scope of the synchronizationtype - the type of synchronization (ONE_WAY or TWO_WAY)diffTree - the sync info tree that contains all out-of-sync resources| Method Detail |
|---|
public ISynchronizationScope getScope()
getScope in interface ISynchronizationContextpublic ISynchronizationScopeManager getScopeManager()
public int getType()
TWO_WAY
indicates that the synchronization information associated with the
context will also be two-way IDiff instances (i.e. there is
only a remote but no base involved in the comparison used to determine
the synchronization state of resources. A type of THREE_WAY
indicates that the synchronization information will be three-way
IThreeWayDiff instances.
getType in interface ISynchronizationContextIDiff,
IThreeWayDiffpublic void dispose()
dispose in interface ISynchronizationContextpublic ICache getCache()
getCache in interface ISynchronizationContextpublic IResourceDiffTree getDiffTree()
IDiff entries for resources that
are out-of-sync. The tree will contain entries for any out-of-sync
resources that are within the scope of this context. The tree may include
entries for additional resources, which should be ignored by the client.
Clients can test for inclusion using the method
ISynchronizationScope.contains(IResource).
The returned IResourceDiffTree will be homogeneous and contain either
IResourceDiff or IThreeWayDiff instances. Any
IThreeWayDiff contained in the returned tree will contain
IResourceDiff instances as the local and remote changes. This
interface also has several helper methods for handling entries contained in
the returned diff tree.
getDiffTree in interface ISynchronizationContextIResourceDiffTree.getDiffs(ResourceTraversal[]),
IResourceDiffTree.getResource(IDiff)
public void refresh(ResourceMapping[] mappings,
IProgressMonitor monitor)
throws CoreException
Changes to the diff tree may be triggered by a call to this method or by a refresh triggered by some other source. Hence, the callback from the diff tree to report changes may occur in the same thread as the refresh or asynchronously in a separate thread, regardless of who triggered the refresh.
refresh in interface ISynchronizationContextmappings - the mappings to be refreshedmonitor - a progress monitor
CoreException - if errors occur
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.