public abstract class SubscriberMergeContext extends MergeContext
Subscriber
,
MergeContext
THREE_WAY, TWO_WAY
Modifier | Constructor and Description |
---|---|
protected |
SubscriberMergeContext(Subscriber subscriber,
ISynchronizationScopeManager manager)
Create a merge context for the given subscriber
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose of the synchronization context and the cache of the context.
|
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class
associated with this object.
|
protected DiffFilter |
getDiffFilter()
Return the diff filter used to filter the differences that the merge context will present to clients.
|
Subscriber |
getSubscriber()
Return the subscriber associated with this context.
|
protected SyncInfo |
getSyncInfo(IResource resource)
Return the sync info for the given resource.
|
protected void |
initialize()
Initialize the diff tree of this context.
|
void |
refresh(ResourceTraversal[] traversals,
int flags,
IProgressMonitor monitor)
Refresh the context in order to update the diff tree returned by
ISynchronizationContext.getDiffTree() to include the latest synchronization state for
the resources. |
protected void |
runInBackground(IWorkspaceRunnable runnable)
Run the given runnable when the background handler
for this context is idle.
|
ensureParentsExist, getMergeRule, getMergeRule, getMergeType, makeInSync, markAsMerged, merge, merge, performReplace, performThreeWayMerge, reject, run
getCache, getDiffTree, getScope, getScopeManager, getType, refresh
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
markAsMerged, reject
getCache, getDiffTree, getScope, getType, refresh
protected SubscriberMergeContext(Subscriber subscriber, ISynchronizationScopeManager manager)
subscriber
- the subscribermanager
- the scope managerprotected void initialize()
protected DiffFilter getDiffFilter()
public void refresh(ResourceTraversal[] traversals, int flags, IProgressMonitor monitor) throws CoreException
ISynchronizationContext
ISynchronizationContext.getDiffTree()
to include the latest synchronization state for
the resources. Any changes will be reported through the change listeners
registered with the diff tree of this context.
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.
traversals
- the resource traversals which indicate which resources are to
be refreshedflags
- additional refresh behavior. For instance, if
RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED
is one of the flags, this indicates that the client will be
accessing the contents of the files covered by the traversals.
NONE
should be used when no additional behavior
is requiredmonitor
- a progress monitor, or null
if progress
reporting is not desiredCoreException
- if the refresh fails. Reasons include:
ISynchronizationContext.getDiffTree()
,
IDiffTree.addDiffChangeListener(IDiffChangeListener)
public void dispose()
SynchronizationContext
dispose
in interface ISynchronizationContext
dispose
in class SynchronizationContext
protected SyncInfo getSyncInfo(IResource resource) throws CoreException
resource
- the resourceCoreException
public Subscriber getSubscriber()
protected void runInBackground(IWorkspaceRunnable runnable)
runnable
- the runnablepublic Object getAdapter(Class adapter)
PlatformObject
null
if
no such object can be found.
This implementation of the method declared by IAdaptable
passes the request along to the platform's adapter manager; roughly
Platform.getAdapterManager().getAdapter(this, adapter)
.
Subclasses may override this method (however, if they do so, they
should invoke the method on their superclass to ensure that the
Platform's adapter manager is consulted).
getAdapter
in interface IAdaptable
getAdapter
in class MergeContext
adapter
- the class to adapt tonull
IAdaptable.getAdapter(Class)
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.