|
Eclipse Platform Release 3.1 |
|||||||||||
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
A resource variant tree subscriber whose trees use an underlying
ThreeWaySycnrhonizer
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 |
---|
addListener, collectOutOfSync, fireTeamResourceChange, getName, 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 subscriberMethod Detail |
protected final IResourceVariantTree getBaseTree()
ResourceVariantTreeSubscriber
getBaseTree
in class ResourceVariantTreeSubscriber
protected final IResourceVariantTree getRemoteTree()
ResourceVariantTreeSubscriber
getRemoteTree
in class ResourceVariantTreeSubscriber
public final IResourceVariantComparator getResourceComparator()
Subscriber
getResourceComparator
in class Subscriber
public void syncStateChanged(IResource[] resources)
ISynchronizerChangeListener
ThreeWaySynchronizer
that generated
this event to determine the new synchronization state.
syncStateChanged
in interface ISynchronizerChangeListener
resources
- the resources whose synchronization state has changedpublic 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 Subscriber
true
if this resource is supervised, and false
otherwise
TeamException
Subscriber.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
TeamException
protected 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.1 |
|||||||||||
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.