|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.team.core.subscribers.Subscriber
org.eclipse.team.core.variants.ResourceVariantTreeSubscriber
org.eclipse.team.core.variants.ThreeWaySubscriber
public abstract class ThreeWaySubscriber
A resource variant tree subscriber whose trees use an underlying
ThreeWaySynchronizer to store and manage the
synchronization state for the local workspace. Subclasses need to
provide a subclass of ThreeWayRemoteTree and a method
to create resource variant handles from the bytes cached in the
ThreeWaySynchronizer.
ThreeWaySynchronizer,
ThreeWayRemoteTree,
CachedResourceVariant| Constructor Summary | |
|---|---|
protected |
ThreeWaySubscriber(ThreeWaySynchronizer synchronizer)
Create a three-way subscriber that uses the given synchronizer to manage the synchronization state of local resources and their variants |
| Method Summary | |
|---|---|
protected abstract ThreeWayRemoteTree |
createRemoteTree()
Create the three-way remote tree which provides access to the remote bytes in the three-way synchronizer. |
protected IResourceVariantTree |
getBaseTree()
Return the base resource variant tree. |
protected IResourceVariantTree |
getRemoteTree()
Return the remote resource variant tree. |
IResourceVariantComparator |
getResourceComparator()
Returns the comparison criteria that will be used by the sync info created by this subscriber. |
abstract IResourceVariant |
getResourceVariant(IResource resource,
byte[] bytes)
Create the resource variant for the given local resource from the given bytes. |
ThreeWaySynchronizer |
getSynchronizer()
Return the three-way synchronizer of this subscriber. |
protected void |
handleRootChanged(IResource resource,
boolean added)
Convenience method that can be used by subclasses to notify listeners when a root is added or removed from the subscriber. |
boolean |
isSupervised(IResource resource)
Returns false for resources that are not children
of a subscriber root, are ignored by the subscriber's synchronizer
or are ignored by the Team.ignoreHist(IResource). |
void |
syncStateChanged(IResource[] resources)
Notification of synchronization state changes for the given resources. |
| Methods inherited from class org.eclipse.team.core.variants.ResourceVariantTreeSubscriber |
|---|
getSyncInfo, getSyncInfo, members, refresh |
| Methods inherited from class org.eclipse.team.core.subscribers.Subscriber |
|---|
accept, accept, addListener, collectOutOfSync, fireTeamResourceChange, getDiff, getName, getState, refresh, removeListener, roots |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ThreeWaySubscriber(ThreeWaySynchronizer synchronizer)
synchronizer - the three-way synchronizer for this subscriber| Method Detail |
|---|
protected final IResourceVariantTree getBaseTree()
ResourceVariantTreeSubscriber
getBaseTree in class ResourceVariantTreeSubscriberprotected final IResourceVariantTree getRemoteTree()
ResourceVariantTreeSubscriber
getRemoteTree in class ResourceVariantTreeSubscriberpublic final IResourceVariantComparator getResourceComparator()
Subscriber
getResourceComparator in class Subscriberpublic void syncStateChanged(IResource[] resources)
ISynchronizerChangeListenerThreeWaySynchronizer that generated
this event to determine the new synchronization state.
syncStateChanged in interface ISynchronizerChangeListenerresources - the resources whose synchronization state has changed
public boolean isSupervised(IResource resource)
throws TeamException
false for resources that are not children
of a subscriber root, are ignored by the subscriber's synchronizer
or are ignored by the Team.ignoreHist(IResource). Returns
true otherwise.
isSupervised in class Subscriberresource - the resource being tested
true if this resource is supervised, and false
otherwise
TeamExceptionSubscriber.isSupervised(IResource)public ThreeWaySynchronizer getSynchronizer()
public abstract IResourceVariant getResourceVariant(IResource resource,
byte[] bytes)
throws TeamException
IResourceVariant#asBytes().
resource - the local resourcebytes - the bytes that identify a variant of the resource
TeamExceptionprotected abstract ThreeWayRemoteTree createRemoteTree()
protected void handleRootChanged(IResource resource,
boolean added)
true if the root was added and false
if it was removed.
resource - the added or removed rootadded - true if the root was added and false
if it was removed.
|
Eclipse Platform Release 3.7 |
|||||||||
| 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, 2011. All rights reserved.